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 #18777: Crash when showing accidentals for trill on tied notes #18780

Merged
merged 3 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/engraving/libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2028,9 +2028,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
Original file line number Diff line number Diff line change
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.