-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Last system fill threshold" should also apply to section breaks #10577
"Last system fill threshold" should also apply to section breaks #10577
Conversation
Fixes https://musescore.org/en/node/81856 I wonder what that crash in the utests is about |
… breaks Backport of musescore#10577
@@ -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 || system->lastMeasure()->sectionBreak()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use lm->sectionBreak()
here. And check whether lm
exists first... might fix that crash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually that check does fix the crash: if ((ctx.curMeasure == 0 || (lm && lm->lastMeasure()->sectionBreak()))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, good catch! thanks
… breaks Backport of musescore#10577
d019dca
to
189e873
Compare
… breaks Backport of musescore#10577
… breaks Backport of musescore#10577
… breaks Backport of musescore#10577
This is a tiny fix.
The setting "Last system fill threshold" (from Style -> Page), by which we don't justify the last system if its width is smaller than a given amount, should also apply to section breaks.
For reference, this is what the program does now (and also MU3.6)
but this would be the correct layout
I don't see any obvious downsides to making this the default behaviour. @oktophonie