Added a no version message

This commit is contained in:
timoreo 2022-01-15 09:06:48 +01:00
parent 4b37c46889
commit f6de472da2
No known key found for this signature in database
GPG Key ID: 121A72C3512BA288

View File

@ -144,6 +144,9 @@ void ModrinthPage::onSelectionChanged(QModelIndex first, QModelIndex second)
} }
ui->versionSelectionBox->addItem(version.version, QVariant(version.downloadUrl)); ui->versionSelectionBox->addItem(version.version, QVariant(version.downloadUrl));
} }
if(ui->versionSelectionBox->count() == 0){
ui->versionSelectionBox->addItem("No Valid Version found !", QVariant(""));
}
suggestCurrent(); suggestCurrent();
}); });
@ -154,7 +157,9 @@ void ModrinthPage::onSelectionChanged(QModelIndex first, QModelIndex second)
for(auto version : current.versions) { for(auto version : current.versions) {
ui->versionSelectionBox->addItem(version.version, QVariant(version.downloadUrl)); ui->versionSelectionBox->addItem(version.version, QVariant(version.downloadUrl));
} }
if(ui->versionSelectionBox->count() == 0){
ui->versionSelectionBox->addItem("No Valid Version found !", QVariant(""));
}
suggestCurrent(); suggestCurrent();
} }
} }