X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fspanner.cc;h=7c36f1755b5701a45d2ea42aea9b7b0bf7a60963;hb=f4d8c77fc2ebac49bbdb0d0e9bec636313508846;hp=5d0485f46e4007bc519a242415957a90fc02e92e;hpb=10845c628c111c6afcf4eb39c3960ee552b95ab9;p=lilypond.git diff --git a/lily/spanner.cc b/lily/spanner.cc index 5d0485f46e..7c36f1755b 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -183,6 +183,10 @@ Spanner::get_bound (Direction d) const /* Set the items that this spanner spans. If D == LEFT, we also set the X-axis parent of THIS to S. + + For example, when a slur crosses a line break, it's broken into two + pieces. The second piece shouldn't be positioned relative to the + original NoteColumn, but rather to the PaperColumn after the break. */ void Spanner::set_bound (Direction d, Grob *s) @@ -200,7 +204,14 @@ Spanner::set_bound (Direction d, Grob *s) We check for System to prevent the column -> line_of_score -> column -> line_of_score -> etc situation */ if (d == LEFT && !dynamic_cast (this)) - set_parent (i, X_AXIS); + /* + If the X-parent is a spanner, it will be split across linebreaks, too, + so we shouldn't have to overwrite it with the bound. Also, we need + original parent for alignment. + This happens e.g. for MultiMeasureRestNumbers and PercentRepeatCounters. + */ + if (!dynamic_cast (this->get_parent (X_AXIS))) + set_parent (i, X_AXIS); /* Signal that this column needs to be kept alive. They need to be