]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/hyphen-engraver.cc
release: 1.3.66
[lilypond.git] / lily / hyphen-engraver.cc
index 9fbbb77f5b95bee47d76c4655230a4c36e600a3d..204995b4b067e6f674cea8a8a72b029c2612405d 100644 (file)
@@ -22,8 +22,8 @@
   then.  */
 class Hyphen_engraver : public Engraver
 {
-  Item *last_lyric_l_;
-  Item *current_lyric_l_;
+  Score_element *last_lyric_l_;
+  Score_element *current_lyric_l_;
   Hyphen_req* req_l_;
   Spanner* hyphen_p_;
 public:
@@ -54,16 +54,16 @@ Hyphen_engraver::Hyphen_engraver ()
 void
 Hyphen_engraver::acknowledge_element (Score_element_info i)
 {
-
   // -> text-item
-  if (Item* t = dynamic_cast<Item*> (i.elem_l_))
+  if (dynamic_cast<Item*> (i.elem_l_)
+      && to_boolean (i.elem_l_->get_elt_property ("text-item-interface")))
     {
-      current_lyric_l_ = t;
+      current_lyric_l_ = i.elem_l_;
       if (hyphen_p_
          && !hyphen_p_->get_bound (RIGHT)
            )
          {
-           Hyphen_spanner (hyphen_p_).set_textitem (RIGHT, t);
+           Hyphen_spanner (hyphen_p_).set_textitem (RIGHT, i.elem_l_);
          }
     }
 }
@@ -89,7 +89,7 @@ Hyphen_engraver::do_removal_processing ()
   if (hyphen_p_)
     {
       req_l_->warning (_ ("unterminated hyphen"));
-      hyphen_p_->set_bound(RIGHT, get_staff_info ().command_pcol_l ());
+      hyphen_p_->set_bound(RIGHT, unsmob_element (get_property ("currentCommandColumn")));
     }
 }