Skip to content

Commit

Permalink
Draw mensur@numbase underneath mensur@sign when no mensur@num
Browse files Browse the repository at this point in the history
* Fixes #3525
* Test suite evaluated locally
  • Loading branch information
lpugin committed Sep 24, 2024
1 parent 5d15bf4 commit 3e186ac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/view_mensural.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ void View::DrawMensur(DeviceContext *dc, LayerElement *element, Layer *layer, St
y = staff->GetDrawingY()
- m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * (2 * staff->m_drawingLines - 2 - mensur->GetLoc());
}
else if (mensur->HasNumbase() && !mensur->HasNum()) {
y += 2 * m_doc->GetDrawingUnit(staff->m_drawingStaffSize);
}

if (mensur->GetSign() == MENSURATIONSIGN_O) {
code = SMUFL_E911_mensuralProlation2;
Expand Down Expand Up @@ -141,6 +144,12 @@ void View::DrawMensur(DeviceContext *dc, LayerElement *element, Layer *layer, St
int numbase = mensur->HasNumbase() ? mensur->GetNumbase() : 0;
this->DrawProportFigures(dc, x, y, mensur->GetNum(), numbase, staff);
}
// It is sure we have a sign - draw the numbase underneath the sign
else if (mensur->HasNumbase()) {
// Draw a single figure but passing numbase - adjust the y accordingly
y -= 4 * m_doc->GetDrawingUnit(staff->m_drawingStaffSize);
this->DrawProportFigures(dc, x, y, mensur->GetNumbase(), 0, staff);
}

dc->EndGraphic(element, this);
} // namespace vrv
Expand Down

0 comments on commit 3e186ac

Please sign in to comment.