fix: make resource buttons work when instance is running

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2022-11-27 23:10:32 +01:00
parent cc92e1b0b6
commit a5b0b4800a
4 changed files with 2 additions and 14 deletions

View File

@ -108,13 +108,13 @@ ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel>
disconnect(mods.get(), &ModFolderModel::updateFinished, this, 0);
});
connect(m_instance, &BaseInstance::runningStatusChanged, this, &ModFolderPage::runningStateChanged);
ModFolderPage::runningStateChanged(m_instance && m_instance->isRunning());
}
}
void ModFolderPage::runningStateChanged(bool running)
{
ExternalResourcesPage::runningStateChanged(running);
ui->actionDownloadItem->setEnabled(!running);
ui->actionUpdateItem->setEnabled(!running);
ui->actionAddItem->setEnabled(!running);