@@ -942,7 +942,7 @@ class MainWindow(QtWidgets.QMainWindow):
for label, points, line_color, fill_color, shape_type, flags in shapes:
shape = Shape(label=label, shape_type=shape_type)
for x, y in points:
- shape.addPoint(QtCore.QPoint(x, y))
+ shape.addPoint(QtCore.QPointF(x, y))
shape.close()
if line_color:
@@ -148,7 +148,7 @@ class Canvas(QtWidgets.QWidget):
"""Update line with last point and current coordinates."""
try:
if QT5:
- pos = self.transformPos(ev.pos())
+ pos = self.transformPos(ev.localPos())
else:
pos = self.transformPos(ev.posF())
except AttributeError: