Skip to content

Commit

Permalink
lastSystemFillLimit also applies to section breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-spa committed Feb 15, 2022
1 parent 8f8e5b0 commit 189e873
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/engraving/layout/layoutsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,9 @@ System* LayoutSystem::collectSystem(const LayoutOptions& options, LayoutContext&
// proportional to the difference between the current length and the target length.
// After few iterations, the length will converge to the target length.
qreal newRest = systemWidth - curSysWidth;
if (ctx.curMeasure == 0 && ((curSysWidth / systemWidth) <= score->styleD(Sid::lastSystemFillLimit))) {
// We do not stretch last system if curSysWidth is <= lastSystemFillLimit
if ((ctx.curMeasure == 0 || (lm && lm->sectionBreak()))
&& ((curSysWidth / systemWidth) <= score->styleD(Sid::lastSystemFillLimit))) {
// We do not stretch last system of a section (or the last of the piece) if curSysWidth is <= lastSystemFillLimit
newRest = 0;
}
if (MScore::noHorizontalStretch) { // Debug feature
Expand Down

0 comments on commit 189e873

Please sign in to comment.