From 6fb3dcdaea8c0269e833132c0fdb61bcf4fc5eeb Mon Sep 17 00:00:00 2001 From: dazedanon Date: Sun, 26 Oct 2025 09:20:16 -0500 Subject: [PATCH] Reset to default if no env --- gui/config_tab.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gui/config_tab.py b/gui/config_tab.py index a805db9..67138ad 100644 --- a/gui/config_tab.py +++ b/gui/config_tab.py @@ -49,8 +49,15 @@ class ConfigTab(QWidget): def __init__(self): super().__init__() self.env_file_path = Path(".env") + # Initialize UI first so widgets/tabs exist for resetting or loading self.init_ui() - self.load_from_env() + + # If a .env file doesn't exist, show defaults in the UI + # (prevents showing stale values from the process/OS environment) + if not self.env_file_path.exists(): + self.reset_to_defaults() + else: + self.load_from_env() def init_ui(self): """Initialize the user interface with horizontal icon navigation at top."""