pygui: fixed edge context, fixed node context, updated find to leverage multi canvas changes and select canvas of found node

This commit is contained in:
Blake Harnden 2021-01-02 00:10:23 -08:00
parent 62d111b74c
commit a7d7b94215
6 changed files with 40 additions and 34 deletions

View file

@ -349,15 +349,14 @@ class CanvasNode:
def has_emane_link(self, iface_id: int) -> Node:
result = None
for edge in self.edges:
if self.id == edge.src:
other_id = edge.dst
if self.id == edge.src.id:
other_node = edge.dst
edge_iface_id = edge.link.iface1.id
else:
other_id = edge.src
other_node = edge.src
edge_iface_id = edge.link.iface2.id
if edge_iface_id != iface_id:
continue
other_node = self.canvas.nodes[other_id]
if other_node.core_node.type == NodeType.EMANE:
result = other_node.core_node
break