fix #298564: shift of manually adjusted slur on small staff #5538
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: https://musescore.org/en/node/298564
We currently write the offsets for slur grips
scaled according to the staff, but we read them
scaled according to the score. That's because
on read, the slur hasn't been added yet, so the track is not set.
I fixed the exact same issue for other lines in
812a281
but slurs have their own read/write and I neglected
to make the corresponding change for them.
This fixes the issue by explicitly scaling according to score.
Note there are other reasons why this makes sense,
see other comments in #4827
for more information on the scaling of offsets and other properties.
I couldn't see a good way to create an automated test for this, as it relies on manual adjustment via editDrag(). Perhaps the recent enhancements to mtest make this more feasible?