Fix QPoint() as unexpected type 'float'. Fixes #3283

This commit is contained in:
grossmj
2022-01-15 18:55:38 +10:30
parent 3c546086ed
commit 6286e596c0

View File

@@ -1411,7 +1411,15 @@ class GraphicsView(QtWidgets.QGraphicsView):
type = "rect"
else:
type = "image"
self.createDrawingItem(type, item.pos().x() + 20, item.pos().y() + 20, item.zValue(), rotation=item.rotation(), svg=item.toSvg())
self.createDrawingItem(
type,
int(item.pos().x() + 20),
int(item.pos().y()) + 20,
item.zValue(),
rotation=item.rotation(),
svg=item.toSvg()
)
elif isinstance(item, NodeItem):
item.node().duplicate(item.pos().x() + 20, item.pos().y() + 20, item.zValue())