Measure number appears after edit in first measure after section break with intervening frame
I suspect I broke this while fixing some similar issues recent, see https://github.com/musescore/MuseScore/pull/7026
1) load attached file
2) select the middle C in the second measure of the section section
3) press any arrow key or make any other edit to that measure
Result: measure number (5) appears above the first measure of the section, despite the fact that first measures of a section should have this suppressed.
It corrects itself on save/reload, or on any edit to that first measure, or to the intervening frame, or any operation that triggers a full relayout.
I assume the cause is wrapped up in how we do partial relayout, trying to figure out an appropriate first and last measure to layout and processing only those. Somehow in reprocessing this system, we aren't correctly doing the look-behind I had added in that PR.
It's possible also the cause for this is wrapped up in other changes made as part of the staff justification algorithm, since that affected this determination. Or just wires got crossed between the two sets of changes.
Comments
Here's the file :-)
See https://github.com/musescore/MuseScore/pull/7568.
https://github.com/musescore/MuseScore/pull/7569
Fixed in branch 3.x, commit 5edf0d5260
_fix #317747: measure number appears after section break
Resolves: https://musescore.org/en/node/317747#comment-1063687
In implementing a bunch of related fixes for the behavior of
section breaks followed by frames or breaks on frames*
in https://github.com/musescore/MuseScore/pull/7026/,
I introduced a new function designed to find relevant section breaks.
However, I missed one opportunity to use this function
(even though I left a TODO for this),
and in one place where I did call the function,
I neglected to actually use its return value.
As a result, in one situation where it previously worked
to place the section break on a frame
but failed when placing the frame after the section break,
my change merely reversed these two cases.
This commit fixes those two oversights.
In these two places where the code previously assumed
we had a MeasureBase that made sense to check for section breaks,
we now call findPotentialSectionBreak() to look backwards.
This ensures we don't miss breaks on or before frames
in these two places in the code._
Automatically closed -- issue fixed for 2 weeks with no activity.