Skip to content

Commit

Permalink
Fix spacing with dots preventing justification
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Oct 2, 2023
1 parent c2049bd commit 27dc692
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/view_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,15 +828,21 @@ void View::DrawDot(DeviceContext *dc, LayerElement *element, Layer *layer, Staff
if (dot->m_drawingPreviousElement && !dot->m_drawingNextElement) {
x += m_doc->GetDrawingUnit(staff->m_drawingStaffSize) * 7 / 2;
y = dot->m_drawingPreviousElement->GetDrawingY();
this->DrawDotsPart(dc, x, y, 1, staff);
}
if (dot->m_drawingPreviousElement && dot->m_drawingNextElement) {
// Do not take into account the spacing since it is place in-between
dc->DeactivateGraphicX();
x += ((dot->m_drawingNextElement->GetDrawingX() - dot->m_drawingPreviousElement->GetDrawingX()) / 2);
x += dot->m_drawingPreviousElement->GetDrawingRadius(m_doc);
y = dot->m_drawingPreviousElement->GetDrawingY();
this->DrawDotsPart(dc, x, y, 1, staff);
dc->ReactivateGraphic();
}
}

this->DrawDotsPart(dc, x, y, 1, staff);
else {
this->DrawDotsPart(dc, x, y, 1, staff);
}
}

dc->EndGraphic(element, this);
Expand Down

0 comments on commit 27dc692

Please sign in to comment.