fix #42541: drum grace notes laid out incorrectly on load

This commit is contained in:
Marc Sabatella 2014-12-27 18:40:57 -07:00
parent be05ea4582
commit 036a6f9975
2 changed files with 12 additions and 7 deletions

View file

@ -1629,9 +1629,11 @@ void Chord::cmdUpdateNotes(AccidentalState* as)
int gnb = getGraceNotesBefore(&graceNotesBefore);
if (gnb) {
for (Chord* ch : graceNotesBefore) {
QList<Note*> notes(ch->notes()); // we need a copy!
for (Note* note : notes)
note->updateAccidental(as);
if (staffGroup != StaffGroup::PERCUSSION) {
QList<Note*> notes(ch->notes()); // we need a copy!
for (Note* note : notes)
note->updateAccidental(as);
}
ch->sortNotes();
}
}
@ -1664,13 +1666,16 @@ void Chord::cmdUpdateNotes(AccidentalState* as)
}
}
}
QList<Chord*> graceNotesAfter;
int gna = getGraceNotesAfter(&graceNotesAfter);
if (gna) {
for (Chord* ch : graceNotesAfter) {
QList<Note*> notes(ch->notes()); // we need a copy!
for (Note* note : notes)
note->updateAccidental(as);
if (staffGroup != StaffGroup::PERCUSSION) {
QList<Note*> notes(ch->notes()); // we need a copy!
for (Note* note : notes)
note->updateAccidental(as);
}
ch->sortNotes();
}
}

View file

@ -1923,7 +1923,7 @@ int Note::line() const
}
//---------------------------------------------------------
// setLine
// setAccidentalType
//---------------------------------------------------------
void Note::setAccidentalType(Accidental::Type type)