Skip to content

Commit

Permalink
Merge pull request #5561 from mattmcclinch/298959-change-accidental
Browse files Browse the repository at this point in the history
fix #298959: Note changes pitch, but accidental is not changed
  • Loading branch information
dmitrio95 committed Mar 20, 2020
2 parents 8264a51 + 2f2d9e3 commit 26fda43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libmscore/cmd.cpp
Expand Up @@ -1830,7 +1830,7 @@ void Score::changeAccidental(Note* note, AccidentalType accidental)
// precautionary or microtonal accidental
// either way, we display it unconditionally
// both for this note and for any linked notes
else if (acc == acc2 || pitch == note->pitch() || Accidental::isMicrotonal(accidental))
else if (acc == acc2 || (pitch == note->pitch() && !Accidental::isMicrotonal(note->accidentalType())) || Accidental::isMicrotonal(accidental))
forceAdd = true;

for (ScoreElement* se : note->linkList()) {
Expand All @@ -1854,6 +1854,9 @@ void Score::changeAccidental(Note* note, AccidentalType accidental)
a1->setRole(AccidentalRole::USER);
lns->undoAddElement(a1);
}
else if (a && Accidental::isMicrotonal(a->accidentalType())) {
lns->undoRemoveElement(a);
}
changeAccidental2(ln, pitch, tpc);
}
setPlayNote(true);
Expand Down

0 comments on commit 26fda43

Please sign in to comment.