MainWindow, Config: Minor change and bug fixe for windows config.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-07-03 17:28:32 +02:00
1 parent 3778818b58
commit 304f10c88d
4 files changed
+30 -22

No files matched your search

+10 -8
View File
@@ -279,6 +279,7 @@ class GraphWidget(QGraphicsView):
self._selected_item = None
self._selected_new_edge_src_node = None
self._current_edge = None
self._current_moved_node = None
self.tmp_line = None
self.node_items = []
@@ -714,15 +715,16 @@ class GraphWidget(QGraphicsView):
self.clicked = False
if self._state == "move":
pos = self.mapToScene(event.pos())
self._undo.push(
SetNodePosCommand(
self._current_moved_node,
(pos.x(), pos.y()),
(self._mouse_origin_x,
self._mouse_origin_y)
if self._current_moved_node is not None:
pos = self.mapToScene(event.pos())
self._undo.push(
SetNodePosCommand(
self._current_moved_node,
(pos.x(), pos.y()),
(self._mouse_origin_x,
self._mouse_origin_y)
)
)
)
self.update()
super(GraphWidget, self).mouseReleaseEvent(event)