mirror of https://gitlab.com/pamhyr/pamhyr2
Network: Fix edge selection crash.
parent
7bafaf33d0
commit
c567a0b370
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue