diff --git a/input/regression/bend-bound.ly b/input/regression/bend-bound.ly index bceb10564eb..be449e03ea3 100644 --- a/input/regression/bend-bound.ly +++ b/input/regression/bend-bound.ly @@ -1,17 +1,40 @@ \version "2.17.30" \header { - texidoc = "Bends should not be effected by the full width of a -@code{NonMusicalPaperColumn}. The bends should have identical X -spans in the two examples. + texidoc = "Bends should not be affected by the full width of a +@code{NonMusicalPaperColumn}. The bends should have identical X +spans in the two scores. No bends should cross bar lines. " } -music = \repeat unfold 16 { c''4\bendAfter #-4 } -sixteens = \repeat unfold 64 { c'16 } +music = \fixed c'' { + c4\bendAfter #-4 + c4\bendAfter #-4 + \repeat volta 2 { + c2\bendAfter #-4 + | + c2\bendAfter #-4 + } + c4\bendAfter #-4 + c4\bendAfter #-4 + | + c4\bendAfter #-4 + c4\bendAfter #-4 + \bar "||" + c2\bendAfter #-4 + | + c2\bendAfter #-4 + \bar "||" + c4\bendAfter #-4 + c4\bendAfter #-4 + | + \bar "|." +} + +sixteenths = \repeat unfold 64 { c'16 } \new Score { - << \music \sixteens >> + << \music \sixteenths >> } \new Score \with { @@ -19,5 +42,5 @@ sixteens = \repeat unfold 64 { c'16 } barNumberVisibility = #(every-nth-bar-number-visible 1) \override BarNumber.break-visibility = #end-of-line-invisible } { - << \music \sixteens >> + << \music \sixteenths >> } diff --git a/lily/bend-engraver.cc b/lily/bend-engraver.cc index 76a24435486..4073c3711ab 100644 --- a/lily/bend-engraver.cc +++ b/lily/bend-engraver.cc @@ -59,11 +59,6 @@ Bend_engraver::finalize () void Bend_engraver::stop_fall () { - bool bar = scm_is_string (get_property (this, "whichBar")); - - fall_->set_bound (RIGHT, unsmob (bar - ? get_property (this, "currentCommandColumn") - : get_property (this, "currentMusicalColumn"))); last_fall_ = fall_; fall_ = 0; note_head_ = 0; @@ -73,6 +68,18 @@ Bend_engraver::stop_fall () void Bend_engraver::stop_translation_timestep () { + if (last_fall_) + { + // don't cross a barline + SCM col_scm = scm_is_string (get_property (this, "whichBar")) + ? get_property (this, "currentCommandColumn") + : get_property (this, "currentMusicalColumn"); + if (auto *col = unsmob (col_scm)) + { + last_fall_->set_bound (RIGHT, col); + } + } + if (fall_ && !fall_->get_bound (LEFT)) { fall_->set_bound (LEFT, note_head_);