Commit ffdeb28b authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Network: Fix potential crash with maptoscene.

No related merge requests found
Pipeline #55025 passed with stages
in 3 minutes and 20 seconds
Showing with 4 additions and 2 deletions
+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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment