diff options
| author | Christian Kolset <ckolset@colostate.edu> | 2026-07-29 13:40:09 -0600 |
|---|---|---|
| committer | Christian Kolset <ckolset@colostate.edu> | 2026-07-29 13:40:09 -0600 |
| commit | 23800a32231acecbace12bfc41c03b081b1bf565 (patch) | |
| tree | 213caf20b68b95ba674cf29d4e806a9b59aadb0d /core/app_settings.py | |
| parent | 2c6b4b751ffdd1156254b31745597654b5f2e286 (diff) | |
| parent | cf33095f77e6ff902fb69932fa704eb6192b3418 (diff) | |
Merge branch 'feat/dev-debug-window'
Diffstat (limited to 'core/app_settings.py')
| -rw-r--r-- | core/app_settings.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/app_settings.py b/core/app_settings.py index e8bc7ae..ea3ac49 100644 --- a/core/app_settings.py +++ b/core/app_settings.py @@ -51,3 +51,22 @@ def save_settings(cfg: dict) -> None: json.dump(cfg, f, indent=2) except Exception: pass + + +# ── Developer mode ──────────────────────────────────────────────────────── +# +# In-memory cache so widgets that build device/config UI (Add Device dialog, +# per-device config panels, plugin panels) can check this without needing +# the full settings dict threaded through their constructors. MainWindow +# keeps it in sync with the persisted setting whenever settings are +# loaded/applied — see set_developer_mode() calls in ui/main_window.py. +_dev_mode = True + + +def is_developer_mode() -> bool: + return _dev_mode + + +def set_developer_mode(value: bool) -> None: + global _dev_mode + _dev_mode = value |
