Disable "Check for Updates" if all mods are removed

Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
This commit is contained in:
Gingeh 2022-08-01 20:18:48 +10:00
parent b15544c163
commit a8dfe98b1a

View File

@ -90,6 +90,9 @@ ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel>
connect(mods.get(), &ModFolderModel::rowsInserted, this,
[this] { ui->actionUpdateItem->setEnabled(ui->treeView->selectionModel()->hasSelection() || !m_model->empty()); });
connect(mods.get(), &ModFolderModel::rowsRemoved, this,
[this] { ui->actionUpdateItem->setEnabled(ui->treeView->selectionModel()->hasSelection() || !m_model->empty()); });
connect(mods.get(), &ModFolderModel::updateFinished, this, [this, mods] {
ui->actionUpdateItem->setEnabled(ui->treeView->selectionModel()->hasSelection() || !m_model->empty());