X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fdynamic-engraver.cc;h=6720e777454fd1a2c95da545ddd4c62652dd1186;hb=2efb2a313d08dd7d6490450e1591ba7feff12581;hp=8d4cb2880f195d1cd0c819092023872ffb154fb5;hpb=31568c504806f35aac420a394c9eab07abd9faa7;p=lilypond.git diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 8d4cb2880f..6720e77745 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -207,15 +207,18 @@ Dynamic_engraver::process_music () string start_type = ly_symbol2string (current_cresc_ev_->get_property ("name")); - - /* - ugh. Use push/pop? - */ + if (start_type == "DecrescendoEvent") start_type = "decrescendo"; else if (start_type == "CrescendoEvent") start_type = "crescendo"; + + + /* + UGH. TODO: should read from original event, so appearance + may be altered with \tweak. + */ SCM s = get_property ((start_type + "Spanner").c_str ()); if (!scm_is_symbol (s) || s == ly_symbol2scm ("hairpin")) { @@ -323,11 +326,21 @@ Dynamic_engraver::typeset_all () { if (finished_cresc_) { - if (!finished_cresc_->get_bound (RIGHT)) + bool use_bar = to_boolean (get_property ("hairpinToBarline")) + && scm_is_string (get_property ("whichBar")) + && !script_ev_; + + + if (!finished_cresc_->get_bound (RIGHT) + || use_bar) { + Grob *column_bound = unsmob_grob (use_bar + ? get_property ("currentCommandColumn") + : get_property ("currentMusicalColumn")); + finished_cresc_->set_bound (RIGHT, script_ ? script_ - : unsmob_grob (get_property ("currentMusicalColumn"))); + : column_bound); if (finished_line_spanner_) add_bound_item (finished_line_spanner_,