Score View does not change position on continuous view
Steps to recreate bug
Create a score with more than 50 measures.
Place it in continuous view.
Zoom in so you see the first few measures.
Select the first measure and hold right.
Expected Behavior:
The score view should keep moving to keep the selected elements in view.
Actual Behavior:
The score view will keep the selected measure in view until around measure 20 where it will stop moving.
Version: 22af1e6
OS: Windows 10 64-bit
Comments
Confirmed. The point where it stops seems dependent on the content of the score. It's measure 20 for an empty score, but earlier for a score with actual notes.
Stepping through the code, it appears the problem occurs here:
https://github.com/musescore/MuseScore/blob/master/mscore/scoreview.cpp…
The intent of this code, I believe, is to make sure when we get close to the end of the score, we stop scrolling - keeping the final measure at the right margin. So this code should not be kicking in. But it is for some reason, and if I skip that line it works.
This code hasn't changed in years so I guess what must have changed is the calculation of the page width. Or maybe mag.
After looking through the code and finding similar problems:
https://musescore.org/en/node/217716
https://musescore.org/en/node/229306
It seems that the issue is indeed how the page width is calculated. It is possible that in continuous view, there was one page in Score::pages() that was the width of the continuous view. Now, the width of the page seems to correlate to the width of a page in page view. Most of this is just educated guessing.
It seems a solution might be found in finding the proper width of the page if in continuous view by finding the left and right side of the continuous view.
I've marked the first one you mentioned (#217716: can't scroll sideways all the way to the end) as a duplicate of this and linked here...a quick reading of that seems to suggest it is the same issue.
And the second one seems very closely related too...probably it is the same underlying cause that you describe here.
The first link has to do with dragging the scoreview and relates to ScoreView::constraintCanvas()
https://github.com/musescore/MuseScore/blob/master/mscore/scoreview.cpp…
The second link has to do with selecting measures past a specific point. This is found in the comment I posted on the bug report (https://musescore.org/en/node/229306#comment-746581)
Both have an issue with the page size but in different locations in the code. The issue for this bug report is exactly where Marc found it in the above comment. This also has the same issue with page size.
relates to #272135: [EPIC] Continuous view issues
Current state:
Looks correct
Automatically closed -- issue fixed for 2 weeks with no activity.