fix initial java dialog

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-08-21 15:01:42 +03:00
parent da7cc529f0
commit 26ae608685

View File

@ -186,13 +186,9 @@ void JavaSettingsWidget::initialize()
.arg(BuildConfig.LAUNCHER_DISPLAYNAME),
QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)
->exec();
if (button == QMessageBox::Yes) {
m_autodetectJavaCheckBox->setChecked(true);
m_autodownloadCheckBox->setChecked(true);
} else {
m_autodetectJavaCheckBox->setChecked(s->get("AutomaticJavaSwitch").toBool());
m_autodownloadCheckBox->setChecked(s->get("AutomaticJavaSwitch").toBool() && s->get("AutomaticJavaDownload").toBool());
}
auto checked = button == QMessageBox::Yes;
m_autodetectJavaCheckBox->setChecked(checked);
m_autodownloadCheckBox->setChecked(checked);
}
}