summaryrefslogtreecommitdiff
path: root/grc/gui/FlowGraph.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/gui/FlowGraph.py')
-rw-r--r--grc/gui/FlowGraph.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 63f289027..f8028f199 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -281,10 +281,10 @@ class FlowGraph(Element):
for selected in selected_elements:
if selected in elements: continue
selected_elements.remove(selected)
- if self._old_selected_port not in elements:
- self._old_selected_port = None
- if self._new_selected_port not in elements:
- self._new_selected_port = None
+ try: assert self._old_selected_port.get_parent() in elements
+ except: self._old_selected_port = None
+ try: assert self._new_selected_port.get_parent() in elements
+ except: self._new_selected_port = None
#update highlighting
for element in elements:
element.set_highlighted(element in selected_elements)