[Regression] Edits after first system cause additional space to accumulate between systems
Reported version
3.x-dev
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
Reported by @S. Christian Collins on Telegram. Enter notes into the third system of the attached score (any score with a full first page, I think) and watch space start being added after the first system.
Must be due to my PR https://github.com/musescore/MuseScore/pull/4949. I think I must not be re-initializing the distance below first staff between layouts. Should be a one liner once I find it...
Attachment | Size |
---|---|
moving_rests.mscz | 12.71 KB |
Fix version
3.1.0
Comments
A bit of further investigation suggests that no, the problem really isn't in this code at all - it's that the y position of the initial systems on the page is never being updated after the initial layout. That is, one the first layout, start out with unstretched distances that are all equal. When editing system 3, only those systems in the range get their y positions reset before we get to layoutPage, so on entry to layoutPage, the system distances are not consistent. So we're applying equal amounts of fill to values that were unequal to begin with.
The only reason this worked before my change was that the algorithm to try to space systems equally was equalizing this, giving more space where needed.
The fix here should be to be sure to recalculate y values for all systems while collecting systems for the page, even those systems that didn't change. if i can figure that out, this should fix it and be the right thing in general. Otherwise, reverting PR https://github.com/musescore/MuseScore/pull/4949 will probably be necessary.
Pull request merged. Y no automagic closing?
Fixed in branch master, commit 17b1a1a0b7
fix #289502: system space keeps increasing
Fixed in branch master, commit 916226550f
_Merge pull request #5051 from MarcSabatella/289502-first-system-space
fix #289502: system space keeps increasing_
Automatically closed -- issue fixed for 2 weeks with no activity.