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
This commit is contained in:
Sefa Eyeoglu 2022-04-18 14:15:02 +02:00
parent fd7745cbeb
commit fa352ff4d3
No known key found for this signature in database
GPG Key ID: C10411294912A422

View File

@ -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
{