Skip to content

Commit

Permalink
Improve apply_changes output message
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroEzq committed Aug 28, 2024
1 parent 60fec4d commit 4d4ccf7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gui/CAEN-N1471H/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ def descrete_values(description):
cancel_button.grid(row=len(properties), column=0, padx=10, pady=10, sticky="e")

def apply_changes():
print("Setting:")
for p, entry in entries.items():
if entry.winfo_class() == "Menubutton":
value = entry.cget("text")
Expand All @@ -388,9 +389,10 @@ def apply_changes():
value = float(value)
except ValueError:
pass
print(f"Setting {p} to {value}, {entry.winfo_class()}")
setattr(ch, p, value)
print(f" {p}\t-> {value}")
new_window.destroy()
print()

apply_button = tk.Button(
new_window,
Expand Down

0 comments on commit 4d4ccf7

Please sign in to comment.