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

@ -510,11 +510,11 @@ class CanvasEdge(Edge):
return self.width != EDGE_WIDTH or self.color != EDGE_COLOR
def set_binding(self) -> None:
show_context = functools.partial(self.show_info, self.src.canvas)
show_context = functools.partial(self.show_context, self.src.canvas)
self.src.canvas.tag_bind(self.id, "<ButtonRelease-3>", show_context)
self.src.canvas.tag_bind(self.id, "<Button-1>", self.show_info)
if self.dst and not self.is_same_canvas():
show_context = functools.partial(self.show_info, self.dst.canvas)
show_context = functools.partial(self.show_context, self.dst.canvas)
self.dst.canvas.tag_bind(self.id2, "<ButtonRelease-3>", show_context)
self.dst.canvas.tag_bind(self.id2, "<Button-1>", self.show_info)