]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/instrument-name-engraver.cc
Run `make grand-replace'.
[lilypond.git] / lily / instrument-name-engraver.cc
index 377d66b832e7b9fe829aea2a219f9636495f1c8a..f38216f16e7d4980a5ecf1c1d3b5f17fb45647f7 100644 (file)
@@ -3,11 +3,10 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2000--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2000--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "engraver.hh"
-#include "spanner.hh"
 #include "pointer-group-interface.hh"
 #include "side-position-interface.hh"
 #include "axis-group-interface.hh"
@@ -91,6 +90,15 @@ Instrument_name_engraver::start_spanner ()
   text_spanner_->set_bound (LEFT, col);
   text_spanner_->set_property ("text", short_text_);
   text_spanner_->set_property ("long-text", long_text_);
+
+  /*
+    UGH, should handle this in Score_engraver.
+  */
+  Grob *system = unsmob_grob (get_property ("rootSystem"));
+  if (system)
+    Axis_group_interface::add_element (system, text_spanner_);
+  else
+    text_spanner_->programming_error ("cannot find root system");
 }
 
 
@@ -130,16 +138,6 @@ Instrument_name_engraver::stop_spanner ()
 
   Pointer_group_interface::set_ordered (text_spanner_, ly_symbol2scm ("elements"), false);
 
-  System *system = get_root_system (text_spanner_);
-
-  /*
-    UGH, should handle this in Score_engraver.
-  */
-  if (system)
-    Axis_group_interface::add_element (system, text_spanner_);
-  else
-    text_spanner_->programming_error ("can't find root system");
-
   text_spanner_ = 0;
 }
 
@@ -148,9 +146,8 @@ Instrument_name_engraver::stop_spanner ()
 ADD_ACKNOWLEDGER (Instrument_name_engraver, axis_group);
 
 ADD_TRANSLATOR (Instrument_name_engraver,
-
                /* doc */
-               "Creates a system start text for instrument or vocal names.",
+               "Create a system start text for instrument or vocal names.",
                
                /* create */
                "InstrumentName ",
@@ -160,7 +157,8 @@ ADD_TRANSLATOR (Instrument_name_engraver,
                "shortInstrumentName "
                "instrumentName "
                "shortVocalName "
-               "vocalName "
-               ,
+               "vocalName ",
 
-               /* write */ "");
+               /* write */
+               ""
+               );