mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-29 19:10:42 +01:00
Network: Fix potential crash with maptoscene.
This commit is contained in:
1 parent
df1ac5586e
commit
ffdeb28bfd
1 file changed
+4
-2
@@ -819,8 +819,10 @@ class GraphWidget(QGraphicsView):
|
||||
if self._state == "move":
|
||||
# Move on scene
|
||||
if (not self.selected_item() and
|
||||
event.buttons() & Qt.LeftButton):
|
||||
old_p = self.mapToScene(self.m_origin_x, self.m_origin_y)
|
||||
(event.buttons() & Qt.LeftButton)):
|
||||
old_p = self.mapToScene(
|
||||
int(self.m_origin_x), int(self.m_origin_y)
|
||||
)
|
||||
new_p = self.mapToScene(event.pos())
|
||||
translation = new_p - old_p
|
||||
|
||||
|
||||
Reference in new issue
Block a user