diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-06-11 12:46:09 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-06-11 12:46:09 +0200 |
| commit | d0d795d12d68fcc18ebc1c0aa62544f6379d41ec (patch) | |
| tree | 832a392060d53233bdb236e3bf1757010cbb3540 /src/mainwindow.cpp | |
| parent | 2285ed32af2e7e89dfaaf9cdf75d1cc9b9b730d9 (diff) | |
Fix refresh events of tabs in the right panel when some tabs are hidden.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0d2597c7..1c31bce8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1865,7 +1865,7 @@ void MainWindow::refreshExecutablesList() void MainWindow::refreshSavesIfOpen() { - if (ui->tabWidget->currentIndex() == 3) { + if (ui->tabWidget->currentIndex() == ui->tabWidget->indexOf(ui->savesTab)) { refreshSaveList(); } } @@ -2276,13 +2276,13 @@ void MainWindow::on_btnRefreshDownloads_clicked() void MainWindow::on_tabWidget_currentChanged(int index) { - if (index == 0) { + if (index == ui->tabWidget->indexOf(ui->espTab)) { m_OrganizerCore.refreshESPList(); - } else if (index == 1) { + } else if (index == ui->tabWidget->indexOf(ui->bsaTab)) { m_OrganizerCore.refreshBSAList(); - } else if (index == 2) { + } else if (index == ui->tabWidget->indexOf(ui->dataTab)) { m_DataTab->activated(); - } else if (index == 3) { + } else if (index == ui->tabWidget->indexOf(ui->savesTab)) { refreshSaveList(); } } @@ -2495,8 +2495,7 @@ void MainWindow::directory_refreshed() // now scheduleCheckForProblems(); - //Some better check for the current tab is needed. - if (ui->tabWidget->currentIndex() == 2) { + if (ui->tabWidget->currentIndex() == ui->tabWidget->indexOf(ui->dataTab)) { m_DataTab->updateTree(); } } |
