Skip to content

Commit

Permalink
Merge pull request #3606 from fernandoherreradelasheras/fix_colored_n…
Browse files Browse the repository at this point in the history
…otes_with_dur_2

Fix issue #3605: draw colored notes and dur="2" with empty note head
  • Loading branch information
lpugin authored Mar 7, 2024
2 parents b7d4d7b + 653fab8 commit 36a50ed
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/view_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1488,16 +1488,22 @@ void View::DrawNote(DeviceContext *dc, LayerElement *element, Layer *layer, Staf
}
drawingDur = DUR_4;
}
drawingDur = ((note->GetColored() == BOOLEAN_true) && drawingDur > DUR_1) ? (drawingDur + 1) : drawingDur;

if (drawingDur < DUR_BR) {
this->DrawMaximaToBrevis(dc, noteY, element, layer, staff);
}
else {
// Whole notes
char32_t fontNo;
if (note->GetColored() == BOOLEAN_true) {
fontNo = (drawingDur == DUR_1) ? SMUFL_E0FA_noteheadWholeFilled : SMUFL_E0A3_noteheadHalf;
if (DUR_1 == drawingDur) {
fontNo = SMUFL_E0FA_noteheadWholeFilled;
}
else if (DUR_2 == drawingDur) {
fontNo = SMUFL_E0FB_noteheadHalfFilled;
}
else {
fontNo = SMUFL_E0A3_noteheadHalf;
}
}
else {
fontNo = note->GetNoteheadGlyph(drawingDur);
Expand Down

0 comments on commit 36a50ed

Please sign in to comment.