This commit is contained in:
Trial97
2023-06-15 10:35:26 +03:00
52 changed files with 1788 additions and 678 deletions

View File

@ -240,10 +240,13 @@ void ResourcePage::updateSelectionButton()
}
m_ui->resourceSelectionButton->setEnabled(true);
if (!getCurrentPack()->isVersionSelected(m_selected_version_index)) {
m_ui->resourceSelectionButton->setText(tr("Select %1 for download").arg(resourceString()));
if (getCurrentPack()) {
if (!getCurrentPack()->isVersionSelected(m_selected_version_index))
m_ui->resourceSelectionButton->setText(tr("Select %1 for download").arg(resourceString()));
else
m_ui->resourceSelectionButton->setText(tr("Deselect %1 for download").arg(resourceString()));
} else {
m_ui->resourceSelectionButton->setText(tr("Deselect %1 for download").arg(resourceString()));
qWarning() << "Tried to update the selected button but there is not a pack selected";
}
}

View File

@ -68,7 +68,7 @@ QString AtlUserInteractionSupportImpl::chooseVersion(Meta::VersionList::Ptr vlis
// select recommended build
for (int i = 0; i < vlist->versions().size(); i++) {
auto version = vlist->versions().at(i);
auto reqs = version->requires();
auto reqs = version->requiredSet();
// filter by minecraft version, if the loader depends on a certain version.
if (minecraftVersion != nullptr) {