fix(ManagedPackPage): clear combo boxes when adding new versions

Prevents versions to undergo mitosis.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-11-12 13:06:20 -03:00
parent 57b905be24
commit 74f7039abf
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -193,6 +193,11 @@ void ModrinthManagedPackPage::parseManagedPack()
return; return;
} }
// We block signals here so that suggestVersion() doesn't get called, causing an assertion fail.
ui->versionsComboBox->blockSignals(true);
ui->versionsComboBox->clear();
ui->versionsComboBox->blockSignals(false);
for (auto version : m_pack.versions) { for (auto version : m_pack.versions) {
QString name; QString name;
@ -328,6 +333,11 @@ void FlameManagedPackPage::parseManagedPack() {
return; return;
} }
// We block signals here so that suggestVersion() doesn't get called, causing an assertion fail.
ui->versionsComboBox->blockSignals(true);
ui->versionsComboBox->clear();
ui->versionsComboBox->blockSignals(false);
for (auto version : m_pack.versions) { for (auto version : m_pack.versions) {
QString name; QString name;