pygui: added view toggle for normal links
This commit is contained in:
parent
cd0351c818
commit
5976bca34b
3 changed files with 7 additions and 0 deletions
|
@ -381,6 +381,7 @@ class CanvasEdge(Edge):
|
|||
def check_wireless(self) -> None:
|
||||
if self.is_wireless():
|
||||
self.canvas.itemconfig(self.id, state=tk.HIDDEN)
|
||||
self.canvas.dtag(self.id, tags.EDGE)
|
||||
self._check_antenna()
|
||||
|
||||
def _check_antenna(self) -> None:
|
||||
|
|
|
@ -97,6 +97,7 @@ class CanvasGraph(tk.Canvas):
|
|||
# drawing related
|
||||
self.show_node_labels: ShowVar = ShowVar(self, tags.NODE_LABEL, value=True)
|
||||
self.show_link_labels: ShowVar = ShowVar(self, tags.LINK_LABEL, value=True)
|
||||
self.show_links: ShowVar = ShowVar(self, tags.EDGE, value=True)
|
||||
self.show_wireless: ShowVar = ShowVar(self, tags.WIRELESS_EDGE, value=True)
|
||||
self.show_grid: ShowVar = ShowVar(self, tags.GRIDLINE, value=True)
|
||||
self.show_annotations: ShowVar = ShowVar(self, tags.ANNOTATION, value=True)
|
||||
|
|
|
@ -167,6 +167,11 @@ class Menubar(tk.Menu):
|
|||
command=self.canvas.show_link_labels.click_handler,
|
||||
variable=self.canvas.show_link_labels,
|
||||
)
|
||||
menu.add_checkbutton(
|
||||
label="Links",
|
||||
command=self.canvas.show_links.click_handler,
|
||||
variable=self.canvas.show_links,
|
||||
)
|
||||
menu.add_checkbutton(
|
||||
label="Wireless Links",
|
||||
command=self.canvas.show_wireless.click_handler,
|
||||
|
|
Loading…
Reference in a new issue