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 #56146: bad read/layout for 1.3 score with invalid symbol tick #1942

Merged
merged 1 commit into from Apr 13, 2015

Conversation

@MarcSabatella
Copy link
Contributor

MarcSabatella commented Apr 12, 2015

This fix is a bit of a hack, but I couldn't come up with a better way to do the job. I guess it's a question of whether the job needs doing - the scores in question are definitely corrupt. But they worked fine in 1.3.

The bottom line is, symbols can be attached to measures (in which case, they are actually parented to a segment) or to notes / other elements. In the case of symbols attached to measures, 1.3 scores would sometimes write a tick value, and if the symbol was copied and pasted from elsewhere, it would be the wrong tick value. At some point in 2.0 development it was discovered these scores would not read correctly, so code was added to skip the tick tag for symbols in 1.3 scores. But this led to other problems - measure-attached (as opposed to note-attached) symbols need their tick tags. So the change was reverted (by me), as I did not understand how to reproduce the original problem. Now I do.

My fix is to temporarily set the parent of the symbol to "this" for 1.3 scores in Measure::read(), so measure-attached symbols can be identified later when reading the symbol properties. When we encounter the tick tag for the symbol, if it's a 1.3 score and the parent is not set to a measure, we ignore the tick. The tick isn't needed if attached to a note anyhow.

@lasconic

This comment has been minimized.

Copy link
Member

lasconic commented Apr 13, 2015

To me it's limited enough to be worth it. I merge it.

lasconic added a commit that referenced this pull request Apr 13, 2015
fix #56146: bad read/layout for 1.3 score with invalid symbol tick
@lasconic lasconic merged commit 3ed9c1f into musescore:master Apr 13, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.