mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
MainWindow, Config: Minor change and bug fixe for windows config.
This commit is contained in:
1 parent
3778818b58
commit
304f10c88d
4 files changed
+30
-22
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user