X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fdynamic-engraver.cc;h=fe6c2d029be69e396027b0b0d85d4f52abc96d2c;hb=c4cfedc7e988cc56d6390881288ae8c1a7e333c3;hp=5de751602481e8e732951b1ceabbc8f6b1b5320c;hpb=b80683cc94b0c22bbe3fccb94a9b2e23787fd10b;p=lilypond.git diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 5de7516024..fe6c2d029b 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -176,6 +176,15 @@ Dynamic_engraver::process_music () } finished_cresc_ = cresc_; + + /* backwards compatibility with hairpinToBarline */ + bool use_bar = to_boolean (get_property ("hairpinToBarline")) + && scm_is_string (get_property ("whichBar")) + && !script_ev_; + + finished_cresc_->set_property ("to-barline", scm_from_bool (use_bar)); + + announce_end_grob (finished_cresc_, SCM_EOL); cresc_ = 0; current_cresc_ev_ = 0; } @@ -335,18 +344,10 @@ Dynamic_engraver::typeset_all () { if (finished_cresc_) { - bool use_bar = to_boolean (get_property ("hairpinToBarline")) - && scm_is_string (get_property ("whichBar")) - && !script_ev_; - - - if (!finished_cresc_->get_bound (RIGHT) - || use_bar) + if (!finished_cresc_->get_bound (RIGHT)) { - Grob *column_bound = unsmob_grob (use_bar - ? get_property ("currentCommandColumn") - : get_property ("currentMusicalColumn")); + Grob *column_bound = unsmob_grob (get_property ("currentMusicalColumn")); finished_cresc_->set_bound (RIGHT, script_ ? script_ @@ -390,7 +391,6 @@ Dynamic_engraver::typeset_all () finished_line_spanner_->set_bound (RIGHT, ci); finished_line_spanner_->set_bound (LEFT, ci); } - finished_line_spanner_ = 0; } } @@ -443,6 +443,7 @@ ADD_TRANSLATOR (Dynamic_engraver, /* create */ "DynamicLineSpanner " + "DynamicTextSpanner " "DynamicText " "Hairpin " "TextSpanner ",