Score view updates incorrectly after an edit that causes the measure to move to another page
Reported version
3.1
Priority
P2 - Medium
Type
Graphical (UI)
Frequency
Many
Severity
S4 - Minor
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project
Whatever the piece we are working on, with more than 3 pages...
1) If we edit something which changes the line/system graphical format and/or lenght/size (space between the notes, lyrics syllable space, add or eliminate rests, add or eliminate notes/chords, etc), Musescore jumps to another page and we lose the graphical place where we were (the expected behaviour would be Musescore remains in the same bar or system, in the same page).
2) The only work around I know is to play the piece to come back to see the original edition point.
Comments
See the original report and posted score, with my comments, in https://musescore.org/en/node/290393#comment-925152
I believe the problem wil turn out to be that we are calling adjustCanvasPosition() before the re-layout, so we are trying to position the canvas based on the old position of the measure. If so, I suspect the fix would be for adjustCanvasPosition to not actually do anything until after the layout performed in endCmd(). So, we leave the calls to adjustCanvasPosition where they are, but change this function to just record the information for later use, then move the existing code to a new function we would call later, during endCmd() processing.
This sounds suspiciously like #290210: Bad layout of pages >1 after edit
It does indeed, but that bug is about bad layout, this one is just about the scoreview not updating properly (it's not jumping when it actually should).
On the other hand, it is within the realm of possibilty that somehow fixing the layout problem might happen to fix the scoreview update problem, if I'm wrong about the problem being due to calling adjustCanvasPosition() too soon.