mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Network: Fix edge selection crash.
This commit is contained in:
1 parent
7bafaf33d0
commit
c567a0b370
1 file changed
+9
-6
@@ -584,7 +584,7 @@ class GraphWidget(QGraphicsView):
|
||||
if item:
|
||||
item.update()
|
||||
except Exception as e:
|
||||
logger.debug(str(e))
|
||||
logger.warning(str(e))
|
||||
|
||||
def selected_new_edge_src_node(self):
|
||||
"""The current node item selected to add new edge
|
||||
@@ -626,12 +626,15 @@ class GraphWidget(QGraphicsView):
|
||||
Returns:
|
||||
Nothing
|
||||
"""
|
||||
previous_edge = self._current_edge
|
||||
self._current_edge = edge
|
||||
self.graph.set_current_reach(edge.edge)
|
||||
try:
|
||||
previous_edge = self._current_edge
|
||||
self._current_edge = edge
|
||||
self.graph.set_current_reach(edge.edge)
|
||||
|
||||
if previous_edge:
|
||||
previous_edge.update()
|
||||
if previous_edge:
|
||||
previous_edge.update()
|
||||
except Exception as e:
|
||||
logger.warning(str(e))
|
||||
|
||||
def reset_selection(self):
|
||||
"""Reset all the selected items
|
||||
|
||||
Reference in new issue
Block a user