Merge pull request #316 from Scrumplex/fix-disabled-controls

This commit is contained in:
Sefa Eyeoglu 2022-03-20 17:46:09 +01:00 committed by GitHub
commit f22cd0e8c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -244,10 +244,7 @@ void ModFolderPage::on_RunningState_changed(bool running)
return;
}
m_controlsEnabled = !running;
ui->actionAdd->setEnabled(m_controlsEnabled);
ui->actionDisable->setEnabled(m_controlsEnabled);
ui->actionEnable->setEnabled(m_controlsEnabled);
ui->actionRemove->setEnabled(m_controlsEnabled);
ui->actionsToolbar->setEnabled(m_controlsEnabled);
}
bool ModFolderPage::shouldDisplay() const

View File

@ -212,6 +212,8 @@ void VersionPage::updateVersionControls()
// FIXME: this is a dirty hack
auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft"));
ui->actionInstall_Forge->setEnabled(controlsEnabled);
bool supportsFabric = minecraftVersion >= Version("1.14");
ui->actionInstall_Fabric->setEnabled(controlsEnabled && supportsFabric);