Staff spacer down doesn't work at page bottom
Reported version
3.x-dev
Priority
P1 - High
Type
Functional
Frequency
Few
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
Adding a Staff spacer down, it doesn't work. Increasing height, the music remains in the same position respect to page border (A4, A5, portrait, landscape).
Musescore stable v3.0 on Linux
Attachment | Size |
---|---|
Error.staff_.space_.down_.png | 27.87 KB |
Fix version
3.4.0
Comments
Works fine for me (Linux too). Could it be, you've added the staff spacer to the wrong staff (to the second instead of the first)? Please attache the score, you've trouble with, explain steps to reproduce and describe what is the expected and the actual behavior.
In reply to Works fine for me (Linux too… by kuwitt
Open file "Staff spacer down - Musescore v2.3.2.mscz" with Musescore v2.3.2
Open file "Staff spacer down - Musescore v3.0.mscz" with Musescore v3.0
I see. Seems at least similar to https://musescore.org/en/node/281328, similar in the sense that it doesn't obey to page boders.
Might turn out to have the same root cause.
https://github.com/musescore/MuseScore/pull/4722
Fixed in branch master, commit 8fa5fcb2d2
fix #281253: staff spacer doesn't work at page bottom
Automatically closed -- issue fixed for 2 weeks with no activity.
Either my fix was incomplete or it broke again later, but anyhow - it seems it fails for systems of more than one staff. Take the default score, add a score staff, then add a spacer to the bottom system of the first page. It has no effect.
Came up again in https://musescore.org/de/node/297087
I don't know that the problems are specifically related, but possibly the same code is involved as in #291466: System being edited stays fixed on current page until editing an earlier system, and they could be worth looking at together.
See also https://musescore.org/en/node/297172#comment-959343, which turns out to provide the key to the solution. It turns out then when we go to calculate the space requires due to spacers for a system, we don't end up looking at the last visible staff, but instead, the top. That's because in System::spacerDistance, we call lastVisibleSysStaff() but then access its "idx" expecting that to be meaningful, and it's not - it's always 0. Need further investigation to understand what that field is even doing there, then, or why this doesn't cause much worse problems in lots of other places, but anyhow, I see why this doesn't work.
https://github.com/musescore/MuseScore/pull/5477
Fixed in branch master, commit 1d56d5564b
_fix #281253: staff spacer down ignored on bottom of page
Resolves: https://musescore.org/en/node/281253
A staff spacer on the bottom system of a page does not work correctly:
we are looking foir a spacer on the first staff rather than the last.
So a spacer on the last staff is ignored, and one on the first is used
when it shouldn't be.
The code to calculate the amount of spacer required below the last
system of a page relies on System::lastVisibleSysStaff(),
which is return the correct SysStaff, but we are then attempting
to access the idx member, which has never been set up and is always 0.
Fix is to initialize idx when setting up the list of staves._
Fixed in branch master, commit d243bcea83
_Merge pull request #5477 from MarcSabatella/281253-spacer-down-system
fix #281253: staff spacer down ignored on bottom of page_
Automatically closed -- issue fixed for 2 weeks with no activity.