pygui: mac editing disabled for nodes during runtime

This commit is contained in:
Blake Harnden 2020-07-31 23:13:07 -07:00
parent 63103ab250
commit eb422f5bab

View file

@ -232,8 +232,10 @@ class NodeConfigDialog(Dialog):
label = ttk.Label(tab, text="MAC")
label.grid(row=row, column=0, padx=PADX, pady=PADY)
auto_set = not iface.mac
mac_state = tk.DISABLED if auto_set else tk.NORMAL
is_auto = tk.BooleanVar(value=auto_set)
mac_state = tk.DISABLED if auto_set else tk.NORMAL
if state == tk.DISABLED:
mac_state = tk.DISABLED
checkbutton = ttk.Checkbutton(
tab, text="Auto?", variable=is_auto, state=state
)