Skip to content

Commit

Permalink
Merge pull request #18782 from mike-spa/port#18777
Browse files Browse the repository at this point in the history
Port #18780: Fix crash for trills with accidentals on tied notes
  • Loading branch information
Eism committed Jul 24, 2023
2 parents dfdbbec + 2426a6c commit 691f32f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/engraving/libmscore/cmd.cpp
Expand Up @@ -2010,9 +2010,7 @@ static void changeAccidental2(Note* n, int pitch, int tpc)
}
}
} else {
Note* nn = n;
while (nn->tieFor()) {
nn = nn->tieFor()->endNote();
for (Note* nn = n; nn && nn->tieFor(); nn = nn->tieFor()->endNote()) {
score->undo(new ChangePitch(nn, pitch, tpc1, tpc2));
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/engraving/libmscore/ornament.cpp
Expand Up @@ -249,6 +249,10 @@ void Ornament::computeNotesAboveAndBelow(AccidentalState* accState)

if (!note) {
note = mainNote->clone();
Tie* tie = note->tieFor();
if (tie) {
score()->undoRemoveElement((EngravingItem*)tie);
}
} else {
note->setTpc1(mainNote->tpc1());
note->setTpc2(mainNote->tpc2());
Expand Down
Binary file added vtest/scores/ornament-8.mscz
Binary file not shown.

0 comments on commit 691f32f

Please sign in to comment.