From b62ff73a13a5e0634b2d87e2ac889aa2e7394167 Mon Sep 17 00:00:00 2001 From: dazedanon Date: Sun, 15 Mar 2026 20:09:44 -0500 Subject: [PATCH] Fix clear focus on confgi --- gui/config_tab.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/config_tab.py b/gui/config_tab.py index 95fc8bf..f535326 100644 --- a/gui/config_tab.py +++ b/gui/config_tab.py @@ -639,6 +639,14 @@ class ConfigTab(QWidget): f"Could not fetch models from the API:\n{error}" ) + def mousePressEvent(self, event): + """Clear focus from any text/spin box when clicking on empty space, + which triggers editingFinished and therefore auto-save.""" + focused = QApplication.focusWidget() + if focused and isinstance(focused, (QLineEdit, QSpinBox, QDoubleSpinBox)): + focused.clearFocus() + super().mousePressEvent(event) + def showEvent(self, event): """Reload values from .env every time this tab becomes visible.""" super().showEvent(event)