Skip to content

Commit

Permalink
Merge pull request #23183 from miiizen/xml-notehead432
Browse files Browse the repository at this point in the history
[4.3.2] Default custom noteheads to normal on non drumset staves
  • Loading branch information
RomanPudashkin authored Jun 11, 2024
2 parents c4575a3 + f30bd45 commit 22b46f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/engraving/dom/note.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,7 @@ SymId Note::noteHead() const

const Staff* st = chord() ? chord()->staff() : nullptr;

NoteHeadGroup headGroup = m_headGroup;
if (m_headGroup == NoteHeadGroup::HEAD_CUSTOM) {
if (st) {
if (st->staffTypeForElement(chord())->isDrumStaff()) {
Expand All @@ -955,6 +956,8 @@ SymId Note::noteHead() const
LOGD("no drumset");
return noteHead(up, NoteHeadGroup::HEAD_NORMAL, ht);
}
} else {
headGroup = NoteHeadGroup::HEAD_NORMAL;
}
} else {
return ldata()->cachedNoteheadSym.value();
Expand All @@ -975,9 +978,9 @@ SymId Note::noteHead() const
if (scheme == NoteHeadScheme::HEAD_AUTO) {
scheme = NoteHeadScheme::HEAD_NORMAL;
}
SymId t = noteHead(up, m_headGroup, ht, tpc(), key, scheme);
SymId t = noteHead(up, headGroup, ht, tpc(), key, scheme);
if (t == SymId::noSym) {
LOGD("invalid notehead %d/%d", int(m_headGroup), int(ht));
LOGD("invalid notehead %d/%d", int(headGroup), int(ht));
t = noteHead(up, NoteHeadGroup::HEAD_NORMAL, ht);
}
return t;
Expand Down

0 comments on commit 22b46f2

Please sign in to comment.