Staff spacer down doesn't work at page bottom

• Jan 5, 2019 - 16:05
Reported version
3.x-dev
Priority
P1 - High
Type
Functional
Frequency
Few
Severity
S3 - Major
Reproducibility
Always
Status
PR created
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

Comments

Status active needs info

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.

Priority P2 - Medium P1 - High
Status closed active
Reported version 3.0 3.x-dev

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.

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.