]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/part-combine-engraver.cc
* lily/include/music.hh (class Music): include SCM init argument.
[lilypond.git] / lily / part-combine-engraver.cc
index a941876ef3f798aceacea6a3f2e2e8716ca63131..8af9aafb825f05ec56f3df63b4d8a0f7940c7994 100644 (file)
@@ -10,7 +10,6 @@
 */
 
 #include "engraver.hh"
-#include "item.hh"
 #include "text-item.hh"
 #include "note-head.hh"
 #include "stem.hh"
@@ -41,29 +40,28 @@ Part_combine_engraver::try_music (Music*m)
 Part_combine_engraver::Part_combine_engraver ()
 {
   text_ = 0;
-  event_  =0;
+  event_  = 0;
 }
 
 void
 Part_combine_engraver::process_music ()
 {
   if (event_
-      && to_boolean (get_property ("soloADue")))
+      && to_boolean (get_property ("printPartCombineTexts")))
     {
       SCM what = event_->get_property ("part-combine-status");
       SCM text = SCM_EOL;
       if (what == ly_symbol2scm ("solo1"))
        text = get_property ("soloText");
-      else if (what== ly_symbol2scm ("solo2"))
+      else if (what == ly_symbol2scm ("solo2"))
        text = get_property ("soloIIText");
       else if (what == ly_symbol2scm ("unisono"))
        text = get_property ("aDueText");
 
-      if (Text_item::markup_p (text))
+      if (Text_interface::markup_p (text))
        {
-         text_ =  make_item ("CombineTextScript");
+         text_ =  make_item ("CombineTextScript", event_->self_scm () );
          text_->set_property ("text", text);
-         announce_grob (text_, event_->self_scm ());
        }
     }
 }
@@ -91,20 +89,16 @@ Part_combine_engraver::acknowledge_grob (Grob_info i)
 void 
 Part_combine_engraver::stop_translation_timestep ()
 {
-  if (text_)
-    {
-      typeset_grob (text_);
       text_ = 0;
-    }
   event_ = 0;
 }
 
-ENTER_DESCRIPTION (Part_combine_engraver,
+ADD_TRANSLATOR (Part_combine_engraver,
 /* descr */       "Part combine engraver for orchestral scores:                "
                  "Print markings a2, Solo, Solo II, and unisono ",
 /* creats*/       "CombineTextScript",
 /* accepts */     "part-combine-event",
 /* acks  */       "multi-measure-rest-interface "
 "slur-interface stem-interface note-head-interface"
-,/* reads */       "soloADue",
+,/* reads */       "printPartCombineTexts",
 /* write */       "");