mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-24 04:22:39 +00:00
NOISSUE Improve new instance dialog
Better layout, showing more of the modpack URL Fixed logic for enabling OK button
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user