summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2021-01-29 19:29:21 +0100
committerGitHub <noreply@github.com>2021-01-29 19:29:21 +0100
commitf53e5406d4292f484257178ec5733f6ceb116673 (patch)
treef08dfdba6a38986a93612a5aa0166f3008110ad7 /src/mainwindow.cpp
parent8606bf70c76252e20f888264bfbdedde0f1c8754 (diff)
parent48fae18ac6baced388b1fa7cee6c18e6aa8dbab3 (diff)
Merge pull request #1378 from Holt59/fix-priority-management
Increase robustness of mods priority in profile.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a25406dd..4053a030 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -313,6 +313,15 @@ MainWindow::MainWindow(Settings &settings
setupModList();
ui->espList->setup(m_OrganizerCore, this, ui);
+ connect(m_OrganizerCore.modList(), &ModList::modPrioritiesChanged, [this]() {
+ onDirectoryStructureChanged();
+ });
+ connect(m_OrganizerCore.modList(), &ModList::modStatesChanged, [this]() {
+ onDirectoryStructureChanged();
+ });
+ connect(m_OrganizerCore.modList(), &QAbstractItemModel::rowsRemoved, [this]() {
+ onDirectoryStructureChanged();
+ });
ui->bsaList->setLocalMoveOnly(true);
ui->bsaList->setHeaderHidden(true);
@@ -385,7 +394,7 @@ MainWindow::MainWindow(Settings &settings
connect(&m_PluginContainer, SIGNAL(diagnosisUpdate()), this, SLOT(scheduleCheckForProblems()));
- connect(m_OrganizerCore.directoryRefresher(), SIGNAL(refreshed()), this, SLOT(directory_refreshed()));
+ connect(m_OrganizerCore.directoryRefresher(), &DirectoryRefresher::refreshed, [this] { onDirectoryStructureChanged(); });
connect(
m_OrganizerCore.directoryRefresher(),
&DirectoryRefresher::progress,
@@ -2191,15 +2200,12 @@ void MainWindow::refresherProgress(const DirectoryRefreshProgress* p)
}
}
-void MainWindow::directory_refreshed()
+void MainWindow::onDirectoryStructureChanged()
{
// some problem-reports may rely on the virtual directory tree so they need to be updated
// now
scheduleCheckForProblems();
-
- if (ui->tabWidget->currentWidget() == ui->dataTab) {
- m_DataTab->updateTree();
- }
+ m_DataTab->updateTree();
}
void MainWindow::modInstalled(const QString &modName)