Skip to content

Commit

Permalink
bugfix: fix gui initialization too early
Browse files Browse the repository at this point in the history
  • Loading branch information
torzdf committed Oct 12, 2022
1 parent a061290 commit 8910ae5
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions lib/gui/popup_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ class SessionTKVars:
smoothamount: :class:`tkinter.DoubleVar`
The amount of smoothing to apply for smoothed data
"""
buildgraph = tk.BooleanVar()
status = tk.StringVar()
display = tk.StringVar()
scale = tk.StringVar()
raw = tk.BooleanVar()
trend = tk.BooleanVar()
avg = tk.BooleanVar()
smoothed = tk.BooleanVar()
outliers = tk.BooleanVar()
buildgraph: tk.BooleanVar
status: tk.StringVar
display: tk.StringVar
scale: tk.StringVar
raw: tk.BooleanVar
trend: tk.BooleanVar
avg: tk.BooleanVar
smoothed: tk.BooleanVar
outliers: tk.BooleanVar
avgiterations: tk.IntVar
smoothamount: tk.DoubleVar
loss_keys: Dict[str, tk.BooleanVar] = field(default_factory=dict)
avgiterations = tk.IntVar()
smoothamount = tk.DoubleVar()


class SessionPopUp(tk.Toplevel):
Expand Down Expand Up @@ -115,7 +115,17 @@ def _set_vars(self) -> SessionTKVars:
The tkinter Variables for the pop up graph
"""
logger.debug("Setting tk graph build variable and internal variables")
retval = SessionTKVars()
retval = SessionTKVars(buildgraph=tk.BooleanVar(),
status=tk.StringVar(),
display=tk.StringVar(),
scale=tk.StringVar(),
raw=tk.BooleanVar(),
trend=tk.BooleanVar(),
avg=tk.BooleanVar(),
smoothed=tk.BooleanVar(),
outliers=tk.BooleanVar(),
avgiterations=tk.IntVar(),
smoothamount=tk.DoubleVar())
retval.buildgraph.set(False)
retval.buildgraph.trace("w", self._graph_build)
return retval
Expand Down

0 comments on commit 8910ae5

Please sign in to comment.