summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAl <26797547+Al12rs@users.noreply.github.com>2020-06-11 04:29:23 -0700
committerGitHub <noreply@github.com>2020-06-11 04:29:23 -0700
commit297cb8320f91377f8029fe9318534f34c83e7461 (patch)
tree722adeca3ac6b2e025dc875251b63bafe1af1a61 /src
parent2285ed32af2e7e89dfaaf9cdf75d1cc9b9b730d9 (diff)
parentbb2dc9bd01fb86f70cd4b84d5169af0fbb363bc7 (diff)
Merge pull request #1123 from Holt59/fix-right-tabs-refresh
Fix refresh events of tabs in the right panel when some tabs are hidden.
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 0d2597c7..fef69010 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->currentWidget() == ui->savesTab) {
refreshSaveList();
}
}
@@ -2276,13 +2276,14 @@ void MainWindow::on_btnRefreshDownloads_clicked()
void MainWindow::on_tabWidget_currentChanged(int index)
{
- if (index == 0) {
+ QWidget* currentWidget = ui->tabWidget->widget(index);
+ if (currentWidget == ui->espTab) {
m_OrganizerCore.refreshESPList();
- } else if (index == 1) {
+ } else if (currentWidget == ui->bsaTab) {
m_OrganizerCore.refreshBSAList();
- } else if (index == 2) {
+ } else if (currentWidget == ui->dataTab) {
m_DataTab->activated();
- } else if (index == 3) {
+ } else if (currentWidget == ui->savesTab) {
refreshSaveList();
}
}
@@ -2495,8 +2496,7 @@ void MainWindow::directory_refreshed()
// now
scheduleCheckForProblems();
- //Some better check for the current tab is needed.
- if (ui->tabWidget->currentIndex() == 2) {
+ if (ui->tabWidget->currentWidget() == ui->dataTab) {
m_DataTab->updateTree();
}
}