Fixed issue with undo and rounded rectangles

This commit is contained in:
Jeremy Borgman
2021-02-16 19:08:47 -06:00
committed by borgmanJeremy
parent 4ab66411b1
commit 911652e5eb
3 changed files with 11 additions and 7 deletions

View File

@@ -65,21 +65,21 @@ void SelectionTool::process(QPainter& painter,
if (recordUndo) {
updateBackup(pixmap);
}
painter.setPen(QPen(m_color, PADDING_VALUE + m_thickness));
painter.setPen(QPen(m_color, m_thickness));
painter.drawRect(QRect(m_points.first, m_points.second));
}
void SelectionTool::paintMousePreview(QPainter& painter,
const CaptureContext& context)
{
painter.setPen(QPen(context.color, PADDING_VALUE + context.thickness));
painter.setPen(QPen(context.color, context.thickness));
painter.drawLine(context.mousePos, context.mousePos);
}
void SelectionTool::drawStart(const CaptureContext& context)
{
m_color = context.color;
m_thickness = context.thickness;
m_thickness = context.thickness + PADDING_VALUE;
m_points.first = context.mousePos;
m_points.second = context.mousePos;
}