Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #298564: shift of manually adjusted slur on small staff #5538

Merged
merged 1 commit into from
Dec 24, 2019

Conversation

MarcSabatella
Copy link
Contributor

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?

@MarcSabatella
Copy link
Contributor Author

MarcSabatella commented Dec 16, 2019

I should add, this change actually doesn't make things worse compatibility-wise. Since we were already reading offsets relative to the score, slurs saved in a build with these changes actually load correctly in older versions. And similarly, scores saved in older versions open the same (erroneous) way in builds with these changes, since we have been reading relative to score all along.

Also, I realize I can make a test for this by putting the adjusted slur in the source file for the test. Then just loading & saving will demonstrate the problem, or not. So, I'll update this shortly.

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
musescore@812a281
but slurs have their own 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 musescore#4827
for more information on the scaling of offsets and other properties.
@MarcSabatella
Copy link
Contributor Author

(I updated with mtest, should be good to go now)

@anatoly-os anatoly-os added this to the MuseScore 3.4 milestone Dec 17, 2019
@dmitrio95 dmitrio95 merged commit 13649eb into musescore:master Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants