提交 df0e4394 编写于 作者: K Kentaro Wada

Load points as float values

上级 48542a6f
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册