]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/instrument-name-engraver.cc
* lily/slur-scoring.cc (move_away_from_staffline): robustness,
[lilypond.git] / lily / instrument-name-engraver.cc
index 34fcca0c2268c419aef40c123e799716e24119c4..e5ac0fe8fe91921e4a3dcf40257e15c1e3b1fdeb 100644 (file)
@@ -17,7 +17,7 @@
 
 class Instrument_name_engraver : public Engraver
 {
-
+  bool first_; 
 public:
   TRANSLATOR_DECLARATIONS (Instrument_name_engraver);
 
@@ -29,11 +29,13 @@ protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void stop_translation_timestep ();
   virtual void process_music ();
+  
 };
 
 Instrument_name_engraver::Instrument_name_engraver ()
 {
   text_ = 0;
+  first_ = true;
 }
 
 void
@@ -51,6 +53,8 @@ Instrument_name_engraver::stop_translation_timestep ()
                           get_property ("instrumentSupport"));
       text_ = 0;
     }
+  
+  first_ = false;
 }
 
 void
@@ -119,7 +123,8 @@ Instrument_name_engraver::process_music ()
     Also create text if barlines in other groups. This allows
     a name to be attached to lyrics or chords.
   */
-  if (scm_is_string (get_property ("whichBar")))
+  if (scm_is_string (get_property ("whichBar"))
+      || first_)
     create_text ();
 }