Skip to content

Commit

Permalink
Fix #81856: "Last system fill threshold" should also apply to section…
Browse files Browse the repository at this point in the history
… breaks

Backport of musescore#10577
  • Loading branch information
mike-spa authored and Jojo-Schmitz committed May 12, 2022
1 parent 6d9d501 commit 2ecb6e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4134,9 +4134,11 @@ System* Score::collectSystem(LayoutContext& lc)
#endif
rest = systemWidth - minWidth;
//
// don’t stretch last system row, if accumulated minWidth is <= lastSystemFillLimit
// don’t stretch last system of a section (or the last of the piece),
// if accumulated minWidth is <= lastSystemFillLimit
//
if (lc.curMeasure == 0 && ((minWidth / systemWidth) <= styleD(Sid::lastSystemFillLimit))) {
if ((lc.curMeasure == 0 || (lm && lm->sectionBreak()))
&& ((minWidth / systemWidth) <= styleD(Sid::lastSystemFillLimit))) {
if (minWidth > rest)
rest = rest * .5;
else
Expand Down

0 comments on commit 2ecb6e6

Please sign in to comment.