fix: refresh settings data when navigating to settings view

Extract data loading into a refresh() method on SettingsView and call it
on view switch so categories, rules, and household data stay current.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-10 15:14:13 -05:00
parent db06108d2b
commit cadb24fed7
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -65,6 +65,8 @@ class MainWindow(QMainWindow):
def _switch_view(self, key: str):
self.stack.setCurrentIndex(self._views[key])
if key == "settings":
self._settings_view.refresh()
def _apply_theme(self, theme: str):
qss_path = Path(__file__).parent / "themes" / f"{theme}.qss"
+4
View File
@@ -39,6 +39,10 @@ class SettingsView(QWidget):
self._build_csv_mappings_tab()
# Initial data load
self.refresh()
def refresh(self):
"""Reload all settings data from the database."""
self._load_categories()
self._load_rules()
self._load_household()