Fix #283964 - Linked parts for single voices don't work #6049
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/283964
Corrects recognition of linked staves with a part and linked staves over excerpts.
Score::undoAddCR() will find all linked staves for the passed
ChordRest
and iterates over all these staves and decides what to do. The root cause of this issue was this algorithm didn't clearly distinguish between the two different kind of linked staves:1 Linked staves within a part
2 Linked staves between master score and scores on excerpt.
This PR now handles creating a
ChordRest
for the following cases:1 On non-linked staff at the master score.
2 On a staff linked, via an excerpt, to another score on another part.
3 On a staff linked, via an excerpt, to another score on another part using the voice-to-part feature.
4 On a staff linked to another staff on the same score ("linked staves" in the Parts dialog).
5 On a staff linked to another staff on the same score and to another part.
6 On a staff linked to another staff on the same score and to another part using the voice-to-part.
All 6 cases are tested by creating a
ChordRest
on the master score and all, if applicable, on any of the linked staves.Corrects recognition of linked staves with a part and linked staves over excerpts.