summaryrefslogtreecommitdiffstats
path: root/gui/pages/ModFolderPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/pages/ModFolderPage.cpp')
-rw-r--r--gui/pages/ModFolderPage.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/gui/pages/ModFolderPage.cpp b/gui/pages/ModFolderPage.cpp
index 6d5c6226..2035e57a 100644
--- a/gui/pages/ModFolderPage.cpp
+++ b/gui/pages/ModFolderPage.cpp
@@ -48,11 +48,12 @@ QString ModFolderPage::id()
return m_id;
}
-ModFolderPage::ModFolderPage(std::shared_ptr<ModList> mods, QString id, QString iconName,
+ModFolderPage::ModFolderPage(BaseInstance * inst, std::shared_ptr<ModList> mods, QString id, QString iconName,
QString displayName, QString helpPage, QWidget *parent)
: QWidget(parent), ui(new Ui::ModFolderPage)
{
ui->setupUi(this);
+ m_inst = inst;
m_mods = mods;
m_id = id;
m_displayName = displayName;
@@ -72,6 +73,13 @@ ModFolderPage::~ModFolderPage()
delete ui;
}
+bool ModFolderPage::shouldDisplay()
+{
+ if(m_inst)
+ return !m_inst->isRunning();
+ return true;
+}
+
bool ModFolderPage::modListFilter(QKeyEvent *keyEvent)
{
switch (keyEvent->key())