diff options
Diffstat (limited to 'gui/dialogs/NewInstanceDialog.cpp')
-rw-r--r-- | gui/dialogs/NewInstanceDialog.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gui/dialogs/NewInstanceDialog.cpp b/gui/dialogs/NewInstanceDialog.cpp index 51060ad2..adb5c950 100644 --- a/gui/dialogs/NewInstanceDialog.cpp +++ b/gui/dialogs/NewInstanceDialog.cpp @@ -98,11 +98,10 @@ NewInstanceDialog::~NewInstanceDialog() void NewInstanceDialog::updateDialogState() { - ui->buttonBox->button(QDialogButtonBox::Ok) - ->setEnabled(!instName().isEmpty() - && m_selectedVersion - && (!ui->modpackBox->isChecked() - || ui->modpackEdit->hasAcceptableInput())); + bool allowOK = !instName().isEmpty() && + (ui->versionBox->isChecked() && m_selectedVersion || + (ui->modpackBox->isChecked() && ui->modpackEdit->hasAcceptableInput())); + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(allowOK); } void NewInstanceDialog::setSelectedVersion(BaseVersionPtr version, bool initial) |