Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix #56146: bad read/layout for 1.3 score with invalid symbol tick #1942
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.