diff options
author | timoreo <timo.oreo34@gmail.com> | 2022-01-15 09:06:48 +0100 |
---|---|---|
committer | timoreo <timo.oreo34@gmail.com> | 2022-01-15 09:06:48 +0100 |
commit | f6de472da2f4b27c941517c17fb604b63d8e21d2 (patch) | |
tree | f91cb86110d5d1de80db2362924461543a392df6 | |
parent | 4b37c46889cb8973d8eb8c22f0c45fe36fdb81cf (diff) | |
download | PrismLauncher-f6de472da2f4b27c941517c17fb604b63d8e21d2.tar.gz PrismLauncher-f6de472da2f4b27c941517c17fb604b63d8e21d2.tar.bz2 PrismLauncher-f6de472da2f4b27c941517c17fb604b63d8e21d2.zip |
Added a no version message
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp index 96797062..f58a884c 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp @@ -144,6 +144,9 @@ void ModrinthPage::onSelectionChanged(QModelIndex first, QModelIndex second) } ui->versionSelectionBox->addItem(version.version, QVariant(version.downloadUrl)); } + if(ui->versionSelectionBox->count() == 0){ + ui->versionSelectionBox->addItem("No Valid Version found !", QVariant("")); + } suggestCurrent(); }); @@ -154,7 +157,9 @@ void ModrinthPage::onSelectionChanged(QModelIndex first, QModelIndex second) for(auto version : current.versions) { ui->versionSelectionBox->addItem(version.version, QVariant(version.downloadUrl)); } - + if(ui->versionSelectionBox->count() == 0){ + ui->versionSelectionBox->addItem("No Valid Version found !", QVariant("")); + } suggestCurrent(); } } |