From fa352ff4d379e3b29ea73d53ba458689c634b467 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 18 Apr 2022 14:15:02 +0200 Subject: [PATCH 1/2] fix: actually check if a mod loader is selected Thus also removes a suggestCurrent call from loaderFilterChanged, as it will already be triggered by setSelectedLoaderVersion --- launcher/ui/pages/modplatform/VanillaPage.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/launcher/ui/pages/modplatform/VanillaPage.cpp b/launcher/ui/pages/modplatform/VanillaPage.cpp index 207d0130..175fda7d 100644 --- a/launcher/ui/pages/modplatform/VanillaPage.cpp +++ b/launcher/ui/pages/modplatform/VanillaPage.cpp @@ -158,7 +158,6 @@ void VanillaPage::loaderFilterChanged() auto vlist = APPLICATION->metadataIndex()->get(m_selectedLoader); ui->loaderVersionList->initialize(vlist.get()); ui->loaderVersionList->selectRecommended(); - suggestCurrent(); ui->loaderVersionList->setEmptyString(tr("No versions are currently available for Minecraft %1").arg(minecraftVersion)); } @@ -205,8 +204,8 @@ void VanillaPage::suggestCurrent() return; } - // List is empty if either no mod loader is selected, or no versions are available - if(!ui->loaderVersionList->hasVersions()) + // There isn't a selected version if the version list is empty + if(ui->loaderVersionList->selectedVersion() == nullptr) dialog->setSuggestedPack(m_selectedVersion->descriptor(), new InstanceCreationTask(m_selectedVersion)); else { From c174a1eb0189cb182769245effe530550c63c499 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 18 Apr 2022 15:05:41 +0200 Subject: [PATCH 2/2] fix: don't set mod loader as important --- launcher/InstanceCreationTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/InstanceCreationTask.cpp b/launcher/InstanceCreationTask.cpp index 24bc5f46..e01bf306 100644 --- a/launcher/InstanceCreationTask.cpp +++ b/launcher/InstanceCreationTask.cpp @@ -31,7 +31,7 @@ void InstanceCreationTask::executeTask() components->buildingFromScratch(); components->setComponentVersion("net.minecraft", m_version->descriptor(), true); if(m_usingLoader) - components->setComponentVersion(m_loader, m_loaderVersion->descriptor(), true); + components->setComponentVersion(m_loader, m_loaderVersion->descriptor()); inst.setName(m_instName); inst.setIconKey(m_instIcon); instanceSettings->resumeSave();