Skip to content

Commit

Permalink
Merge pull request #23453 from miiizen/23401-tie-voice
Browse files Browse the repository at this point in the history
Set correct notes on changing tie voice
  • Loading branch information
mike-spa committed Jul 5, 2024
2 parents 3cfe175 + 68fb3fb commit 8b06e64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/engraving/dom/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5253,15 +5253,16 @@ void Score::changeSelectedNotesVoice(voice_idx_t voice)
}
for (EngravingObject* linked : note->linkList()) {
Note* linkedNote = toNote(linked);
Note* linkedNewNote = linked == note ? newNote : toNote(newNote->findLinkedInStaff(linkedNote->staff()));
// reconnect the tie to this note, if any
Tie* tie = linkedNote->tieBack();
if (tie) {
undoChangeSpannerElements(tie, tie->startNote(), newNote->findLinkedInStaff(linkedNote->staff()));
undoChangeSpannerElements(tie, tie->startNote(), linkedNewNote);
}
// reconnect the tie from this note, if any
tie = linkedNote->tieFor();
if (tie) {
undoChangeSpannerElements(tie, newNote->findLinkedInStaff(linkedNote->staff()), tie->endNote());
undoChangeSpannerElements(tie, linkedNewNote, tie->endNote());
}
}

Expand Down

0 comments on commit 8b06e64

Please sign in to comment.