MuseScore
MuseScore copied to clipboard
[MU4] Compute snapped beam adjustments irrespective of page position
The issue:
With snapping turned on, beams would snap to weird different places. This was due to the fact that it was applying snapping to the anchor's page position, which can change if there are margins or titles (or other staves) that push it down the page. Snapping is now done first and then page position is added.
There's a vtest which I hope will show the difference
Related problem (not to be fixed in this PR as it's not a regression and affects more than just beams in any case; addressing it will take some discussion):
Small/resized staves seem to cause a problem. If I have this (normal size stave, first beam is default position but second has its height set to 4 left and 3 right):
If I make this a small stave:
The default position is good, the customised one is not.
This will mess up scores where custom beam position snapping is disabled (which isn't likely to happen since there's no UI to do that, but still). We should add pagePos().y()
in all cases.
This will mess up scores where custom beam position snapping is disabled (which isn't likely to happen since there's no UI to do that, but still). We should add
pagePos().y()
in all cases.
Very good point! Fixed it to add at the end regardless of snapping.