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

@ -70,10 +70,10 @@ class LinkConfigurationDialog(Dialog):
def draw(self) -> None:
self.top.columnconfigure(0, weight=1)
src_label = self.app.canvas.nodes[self.edge.src].core_node.name
src_label = self.edge.src.core_node.name
if self.edge.link.iface1:
src_label += f":{self.edge.link.iface1.name}"
dst_label = self.app.canvas.nodes[self.edge.dst].core_node.name
dst_label = self.edge.dst.core_node.name
if self.edge.link.iface2:
dst_label += f":{self.edge.link.iface2.name}"
label = ttk.Label(
@ -316,10 +316,8 @@ class LinkConfigurationDialog(Dialog):
"""
populate link config to the table
"""
width = self.app.canvas.itemcget(self.edge.id, "width")
self.width.set(width)
color = self.app.canvas.itemcget(self.edge.id, "fill")
self.color.set(color)
self.width.set(self.edge.width)
self.color.set(self.edge.color)
link = self.edge.link
if link.options:
self.bandwidth.set(str(link.options.bandwidth))