Preferences: lazy loading on connect, on by default
Off reads the whole app from app.sab when connecting. Read at each connect, so a change takes effect on the next one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2699,6 +2699,18 @@ def open_preferences_dialog():
|
||||
)
|
||||
chk_trace_dasp.grid(row=5, column=1, sticky="w", pady=(0, 15))
|
||||
|
||||
lbl_lazy = ttk.Label(frame_padded, text="Lazy loading on connect?", anchor="w")
|
||||
lbl_lazy.grid(row=6, column=0, sticky="w", pady=(0, 15), padx=(0, 10))
|
||||
|
||||
# Off: the whole app is read from app.sab when connecting. Takes effect on the next.
|
||||
var_lazy_loading = tk.BooleanVar(value=app_state.LAZY_LOADING)
|
||||
chk_lazy_loading = ttk.Checkbutton(
|
||||
frame_padded,
|
||||
text="Yes",
|
||||
variable=var_lazy_loading
|
||||
)
|
||||
chk_lazy_loading.grid(row=6, column=1, sticky="w", pady=(0, 15))
|
||||
|
||||
def apply_preferences():
|
||||
try:
|
||||
val = int(entry_grid.get().strip())
|
||||
@@ -2755,6 +2767,7 @@ def open_preferences_dialog():
|
||||
app_state.GRID_SIZE = val
|
||||
app_state.ADD_TIMESTAMP = var_timestamp.get()
|
||||
app_state.TRACE_DASP = var_trace_dasp.get()
|
||||
app_state.LAZY_LOADING = var_lazy_loading.get()
|
||||
app_state.SEDONA_HOME = entry_home.get().strip()
|
||||
|
||||
app_state.save_preferences()
|
||||
@@ -2773,7 +2786,7 @@ def open_preferences_dialog():
|
||||
messagebox.showerror("Invalid Input", message, parent=dialog)
|
||||
|
||||
btn_save_pref = ttk.Button(frame_padded, text="Apply Changes", command=apply_preferences)
|
||||
btn_save_pref.grid(row=6, column=1, sticky="e")
|
||||
btn_save_pref.grid(row=7, column=1, sticky="e")
|
||||
|
||||
if not app_state.SEDONA_HOME:
|
||||
entry_home.focus_set()
|
||||
|
||||
Reference in New Issue
Block a user