From 4cd6aa34160ec97180b41b9658f2ab31264ce1ae Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Wed, 15 Apr 2026 15:34:06 -0500 Subject: 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) --- src/src/mainwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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*))); -- cgit v1.3.1