mirror of
https://github.com/Ultimaker/Cura.git
synced 2026-03-14 15:26:02 -06:00
Painting: Fix non-drag not producing a circle (square was already OK though).
part of CURA-12543
This commit is contained in:
parent
c9ca999f10
commit
d28c2aac68
1 changed files with 4 additions and 1 deletions
|
|
@ -75,7 +75,10 @@ class PaintTool(Tool):
|
|||
painter = QPainter(stroke_image)
|
||||
painter.setRenderHint(QPainter.RenderHint.Antialiasing, False)
|
||||
painter.setPen(self._brush_pen)
|
||||
painter.drawLine(int(x0 - start_x), int(y0 - start_y), int(x1 - start_x), int(y1 - start_y))
|
||||
if xdiff == 0 and ydiff == 0:
|
||||
painter.drawPoint(int(x0 - start_x), int(y0 - start_y))
|
||||
else:
|
||||
painter.drawLine(int(x0 - start_x), int(y0 - start_y), int(x1 - start_x), int(y1 - start_y))
|
||||
painter.end()
|
||||
|
||||
return stroke_image, (start_x, start_y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue