diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-15 10:35:26 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-15 10:35:26 +0300 |
commit | 182e19eae3e2aa9f50dde140d10db858b5bf6076 (patch) | |
tree | e36e6ddfeb937b52208ccd6bd2d9fc10cd6c4a37 /launcher/ui/pages/modplatform | |
parent | 9ca74cd0095a7e2be40e72e36f5b51dd80f198bb (diff) | |
parent | 9908e115aa6bdfcceefd1425406d1b6d1c1bdec4 (diff) | |
download | PrismLauncher-182e19eae3e2aa9f50dde140d10db858b5bf6076.tar.gz PrismLauncher-182e19eae3e2aa9f50dde140d10db858b5bf6076.tar.bz2 PrismLauncher-182e19eae3e2aa9f50dde140d10db858b5bf6076.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop
Diffstat (limited to 'launcher/ui/pages/modplatform')
-rw-r--r-- | launcher/ui/pages/modplatform/ResourcePage.cpp | 9 | ||||
-rw-r--r-- | launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/launcher/ui/pages/modplatform/ResourcePage.cpp b/launcher/ui/pages/modplatform/ResourcePage.cpp index 736034ad..1d2509d8 100644 --- a/launcher/ui/pages/modplatform/ResourcePage.cpp +++ b/launcher/ui/pages/modplatform/ResourcePage.cpp @@ -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"; } } diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp index f5f50cae..3d2d568a 100644 --- a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp +++ b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp @@ -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) { |