diff options
author | Petr Mrázek <peterix@users.noreply.github.com> | 2021-06-09 21:54:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 21:54:22 +0200 |
commit | 9fafe3ffe6fd970b5096c31db8687e4c62c0cfa6 (patch) | |
tree | 2f91407d5b358b221664216886b89fcb79520eeb /application/pages/instance | |
parent | 60b686f01458fc1f31109a0be71d790b8f7ec22b (diff) | |
parent | 3390367d931cc47a8c9980d456546326d5c5e2cd (diff) | |
download | PrismLauncher-9fafe3ffe6fd970b5096c31db8687e4c62c0cfa6.tar.gz PrismLauncher-9fafe3ffe6fd970b5096c31db8687e4c62c0cfa6.tar.bz2 PrismLauncher-9fafe3ffe6fd970b5096c31db8687e4c62c0cfa6.zip |
Merge pull request #3833 from jamierocks/disable-forge-btn-when-game-running
NOISSUE Disable 'Install Forge' button when game is running
Diffstat (limited to 'application/pages/instance')
-rw-r--r-- | application/pages/instance/VersionPage.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/application/pages/instance/VersionPage.cpp b/application/pages/instance/VersionPage.cpp index 54d75d06..7f7ba860 100644 --- a/application/pages/instance/VersionPage.cpp +++ b/application/pages/instance/VersionPage.cpp @@ -203,11 +203,11 @@ void VersionPage::updateVersionControls() { // FIXME: this is a dirty hack auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft")); - bool newCraft = controlsEnabled && (minecraftVersion >= Version("1.14")); - bool oldCraft = controlsEnabled && (minecraftVersion <= Version("1.12.2")); - ui->actionInstall_Fabric->setEnabled(newCraft); - ui->actionInstall_Forge->setEnabled(true); - ui->actionInstall_LiteLoader->setEnabled(oldCraft); + bool newCraft = minecraftVersion >= Version("1.14"); + bool oldCraft = minecraftVersion <= Version("1.12.2"); + ui->actionInstall_Fabric->setEnabled(controlsEnabled && newCraft); + ui->actionInstall_Forge->setEnabled(controlsEnabled); + ui->actionInstall_LiteLoader->setEnabled(controlsEnabled && oldCraft); ui->actionReload->setEnabled(true); updateButtons(); } |