Network: Fix edge selection crash.

mesh
Pierre-Antoine Rouby 2023-09-19 11:56:08 +02:00
parent 7bafaf33d0
commit c567a0b370
1 changed files with 9 additions and 6 deletions

View File

@ -584,7 +584,7 @@ class GraphWidget(QGraphicsView):
if item: if item:
item.update() item.update()
except Exception as e: except Exception as e:
logger.debug(str(e)) logger.warning(str(e))
def selected_new_edge_src_node(self): def selected_new_edge_src_node(self):
"""The current node item selected to add new edge """The current node item selected to add new edge
@ -626,12 +626,15 @@ class GraphWidget(QGraphicsView):
Returns: Returns:
Nothing Nothing
""" """
previous_edge = self._current_edge try:
self._current_edge = edge previous_edge = self._current_edge
self.graph.set_current_reach(edge.edge) self._current_edge = edge
self.graph.set_current_reach(edge.edge)
if previous_edge: if previous_edge:
previous_edge.update() previous_edge.update()
except Exception as e:
logger.warning(str(e))
def reset_selection(self): def reset_selection(self):
"""Reset all the selected items """Reset all the selected items