diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-29 19:27:10 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-29 19:27:10 +0100 |
| commit | 48fae18ac6baced388b1fa7cee6c18e6aa8dbab3 (patch) | |
| tree | 4fc903d08ca5d41c5eb2ae527bea6f7069bdf587 /src/mainwindow.cpp | |
| parent | ab820c1b0a5bb0f002ec5aba7954330acbdeb978 (diff) | |
Fix refresh of data tab.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d6391677..a3144edd 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -314,10 +314,13 @@ MainWindow::MainWindow(Settings &settings setupModList(); ui->espList->setup(m_OrganizerCore, this, ui); connect(m_OrganizerCore.modList(), &ModList::modPrioritiesChanged, [this]() { - m_DataTab->updateTree(); + onDirectoryStructureChanged(); }); connect(m_OrganizerCore.modList(), &ModList::modStatesChanged, [this]() { - m_DataTab->updateTree(); + onDirectoryStructureChanged(); + }); + connect(m_OrganizerCore.modList(), &QAbstractItemModel::rowsRemoved, [this]() { + onDirectoryStructureChanged(); }); ui->bsaList->setLocalMoveOnly(true); @@ -391,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, @@ -2184,15 +2187,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) |
