diff options
| author | Al <26797547+Al12rs@users.noreply.github.com> | 2020-06-09 13:16:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-09 13:16:42 -0700 |
| commit | 054af144fce635172df7f6be257c743c588569c4 (patch) | |
| tree | 2fc65437dee50b365099687bc5a157bb216dfd3f /src/mainwindow.cpp | |
| parent | da66cb4917c31d574ab3f6c37d21644c1b6bf78f (diff) | |
| parent | af723f42979f715a9c44a35114f6f1990208cde0 (diff) | |
Merge pull request #1120 from Holt59/hide-unused-tabs
Hide plugins and archives tabs when features are missing.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9777091a..0d2597c7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -184,6 +184,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <sstream> #include <utility> +#include "gameplugins.h" + #ifdef TEST_MODELS #include "modeltest.h" #endif // TEST_MODELS @@ -363,6 +365,15 @@ MainWindow::MainWindow(Settings &settings m_DataTab.get(), &DataTab::displayModInformation, [&](auto&& m, auto&& i, auto&& tab){ displayModInformation(m, i, tab); }); + // Hide stuff we do not need: + IPluginGame const* game = m_OrganizerCore.managedGame(); + if (!game->feature<GamePlugins>()) { + ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->espTab)); + } + if (!game->feature<DataArchives>()) { + ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->bsaTab)); + } + settings.geometry().restoreState(ui->downloadView->header()); ui->splitter->setStretchFactor(0, 3); @@ -526,6 +537,7 @@ MainWindow::MainWindow(Settings &settings updatePluginCount(); updateModCount(); processUpdates(); + ui->statusBar->updateNormalMessage(m_OrganizerCore); } |
