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.
Resolves: https://musescore.org/en/node/295892
If a measure is followed by a horizontal frame and then a measure with a start repeat,
the end barline of the first measure is not displayed.
This is because we are optiizing that away thinking it won't be needed
because we will simply use the start repeat of the next measure.
This would be true if not for the frame.
So I simply added a check to make sure the next measure is the same as the next measurebase,
and clarified the comments.
The bend symbol displays in the palette using
a "random" (first in alphabetical order) font.
This is simply because the bendStyle fails to set up
the association between Sid::bendFontFace and Pid::FONT_FACE.
It seems this line was inadvertently removed
when we made the change to merge italic/bold/underline into style.
It sometimes comes up that the best way to solve some particular problem
would be to attach a symbol to a barline
(eg, think about the commonly-requested multimeasure repeat symbol).
But we don't support symbols on barlines, so you end up settling for
attaching to the first note or rest in the bar then moving manually,
and this adjustment does not necessarily survicve layout changes.
This commit adds direct support for symbols on barlines.
Also images, since the code involved is so similar, they are handled here as well.
Symbols and images are recorded as child elements,
which were already being laid out so no special handling was needed
beyond adding & removing, reading nd writing.
Although I did need to make sure the track & score were managed correctly.
Cherry-pick fix from 2.3.1. Fix dot position and aligned it with noteHeadWidth as it was before, not stemPosX as it has been done (incorrectly?) during refactoring.