]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/instrument-name-engraver.cc
release: 1.3.127
[lilypond.git] / lily / instrument-name-engraver.cc
index cac8ec76d4e73c69fd9d582859d0613e637a2346..4b534dac3cd1040b4271ed47108c3c4c267cdc47 100644 (file)
@@ -53,11 +53,13 @@ Instrument_name_engraver::create_text (SCM txt)
   if(!text_)
     {
       text_ = new Item (get_property ("InstrumentName"));
-      text_->set_grob_property ("text", txt);
-
+      
+      if (text_->get_grob_property ("text") != txt)
+       text_->set_grob_property ("text", txt);
+     
       if (delim_)
-       text_->set_parent (delim_, Y_AXIS);
-
+        text_->set_parent (delim_, Y_AXIS);
+      
       announce_grob (text_,0);
     }
 }
@@ -72,10 +74,12 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i)
       if (now_mom () > Moment (0))
        s = get_property ("instr");
 
-      if (gh_string_p (s))
-       {
-         create_text (s);
-       }
+      /*
+       FIXME: use markup_p () to check type.
+      */
+      if (gh_string_p (s) || gh_pair_p (s))
+       create_text (s);
+         
     }
 
   if (Align_interface::has_interface (i.elem_l_)