MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

[MU4] Compute snapped beam adjustments irrespective of page position

Open asattely opened this issue 2 years ago • 2 comments

The issue: image

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

asattely avatar Sep 19 '22 18:09 asattely

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):

image

If I make this a small stave:

image

The default position is good, the customised one is not.

oktophonie avatar Sep 20 '22 11:09 oktophonie

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.

cbjeukendrup avatar Sep 21 '22 21:09 cbjeukendrup

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.

asattely avatar Sep 28 '22 15:09 asattely