mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Network, BC: Fix mouseReleaseEvent and contextMenuEvent Exception.
This commit is contained in:
1 parent
ee22dab89c
commit
304f7f1495
1 file changed
+6
@@ -736,6 +736,9 @@ class GraphWidget(QGraphicsView):
|
||||
def mouseReleaseEvent(self, event):
|
||||
self.clicked = False
|
||||
|
||||
if self._only_display:
|
||||
return
|
||||
|
||||
if self._state == "move":
|
||||
if self._current_moved_node is not None:
|
||||
pos = self.mapToScene(event.pos())
|
||||
@@ -841,6 +844,9 @@ class GraphWidget(QGraphicsView):
|
||||
self.reverse_edge(items[0])
|
||||
|
||||
def contextMenuEvent(self, event):
|
||||
if self._only_display:
|
||||
return
|
||||
|
||||
pos = self.mapToScene(event.pos())
|
||||
items = self.items(event.pos())
|
||||
|
||||
|
||||
Reference in new issue
Block a user