fix: disable "Install Forge" button when needed

This commit is contained in:
Sefa Eyeoglu 2022-03-20 15:35:35 +01:00
parent 768007d980
commit 702a1da0ac
No known key found for this signature in database
GPG Key ID: C10411294912A422

View File

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