Skip to content

Commit 22b46f2

Browse files
Merge pull request #23183 from miiizen/xml-notehead432
[4.3.2] Default custom noteheads to normal on non drumset staves
2 parents c4575a3 + f30bd45 commit 22b46f2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/engraving/dom/note.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ SymId Note::noteHead() const
943943

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

946+
NoteHeadGroup headGroup = m_headGroup;
946947
if (m_headGroup == NoteHeadGroup::HEAD_CUSTOM) {
947948
if (st) {
948949
if (st->staffTypeForElement(chord())->isDrumStaff()) {
@@ -955,6 +956,8 @@ SymId Note::noteHead() const
955956
LOGD("no drumset");
956957
return noteHead(up, NoteHeadGroup::HEAD_NORMAL, ht);
957958
}
959+
} else {
960+
headGroup = NoteHeadGroup::HEAD_NORMAL;
958961
}
959962
} else {
960963
return ldata()->cachedNoteheadSym.value();
@@ -975,9 +978,9 @@ SymId Note::noteHead() const
975978
if (scheme == NoteHeadScheme::HEAD_AUTO) {
976979
scheme = NoteHeadScheme::HEAD_NORMAL;
977980
}
978-
SymId t = noteHead(up, m_headGroup, ht, tpc(), key, scheme);
981+
SymId t = noteHead(up, headGroup, ht, tpc(), key, scheme);
979982
if (t == SymId::noSym) {
980-
LOGD("invalid notehead %d/%d", int(m_headGroup), int(ht));
983+
LOGD("invalid notehead %d/%d", int(headGroup), int(ht));
981984
t = noteHead(up, NoteHeadGroup::HEAD_NORMAL, ht);
982985
}
983986
return t;

0 commit comments

Comments
 (0)