Fixed issue with undo and rounded rectangles
This commit is contained in:
committed by
borgmanJeremy
parent
4ab66411b1
commit
911652e5eb
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user