aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-15 15:34:06 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-15 15:34:06 -0500
commit4cd6aa34160ec97180b41b9658f2ab31264ce1ae (patch)
tree4a0ca6f11a8fbb06476673498c83d720eeeb478a /src
parent6fe3cf9f6becc6853587c34998c94b9d54137051 (diff)
Refresh Data tab automatically when mods toggle
OrganizerCore::modStatusChanged updates the DirectoryStructure in place (enabling/disabling origins) but never fires directoryStructureReady, which is the only signal MainWindow used to drive DataTab::updateTree. Result: after enabling or disabling a mod the Data tab kept showing the old virtual tree until the user hit Refresh manually. Connect ModList::modStatesChanged directly to DataTab::updateTree so the file tree re-queries the structure as soon as the toggle lands. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src')
-rw-r--r--src/src/mainwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/src/mainwindow.cpp b/src/src/mainwindow.cpp
index e148c24..1ef6fe1 100644
--- a/src/src/mainwindow.cpp
+++ b/src/src/mainwindow.cpp
@@ -397,6 +397,13 @@ MainWindow::MainWindow(Settings& settings, OrganizerCore& organizerCore,
connect(&m_OrganizerCore, &OrganizerCore::directoryStructureReady, this,
&MainWindow::onDirectoryStructureChanged);
+
+ // OrganizerCore::modStatusChanged updates the DirectoryStructure in place
+ // but never emits directoryStructureReady, so without this the Data tab
+ // stays stale until the user clicks Refresh. Route the ModList signal to
+ // DataTab::updateTree directly.
+ connect(m_OrganizerCore.modList(), &ModList::modStatesChanged, this,
+ [this] { m_DataTab->updateTree(); });
connect(m_OrganizerCore.directoryRefresher(),
SIGNAL(progress(const DirectoryRefreshProgress*)), this,
SLOT(refresherProgress(const DirectoryRefreshProgress*)));