mirror of https://gitlab.com/pamhyr/pamhyr2
Network: Fix potential crash with maptoscene.
parent
df1ac5586e
commit
ffdeb28bfd
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue