fix(FlamePage): don't assert / suggest blocked modpacks
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
bb386a1162
commit
6f50809457
@ -217,12 +217,16 @@ void FlamePage::suggestCurrent()
|
|||||||
|
|
||||||
void FlamePage::onVersionSelectionChanged(QString data)
|
void FlamePage::onVersionSelectionChanged(QString data)
|
||||||
{
|
{
|
||||||
if (data.isNull() || data.isEmpty()) {
|
bool is_blocked = false;
|
||||||
|
ui->versionSelectionBox->currentData().toInt(&is_blocked);
|
||||||
|
|
||||||
|
if (data.isNull() || data.isEmpty() || is_blocked) {
|
||||||
m_selected_version_index = -1;
|
m_selected_version_index = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_selected_version_index = ui->versionSelectionBox->currentIndex();
|
m_selected_version_index = ui->versionSelectionBox->currentIndex();
|
||||||
|
|
||||||
Q_ASSERT(current.versions.at(m_selected_version_index).downloadUrl == ui->versionSelectionBox->currentData().toString());
|
Q_ASSERT(current.versions.at(m_selected_version_index).downloadUrl == ui->versionSelectionBox->currentData().toString());
|
||||||
|
|
||||||
suggestCurrent();
|
suggestCurrent();
|
||||||
|
Loading…
Reference in New Issue
Block a user