Fix #4083 - server address text box is enabled even if auto-join is disabled

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2025-08-21 12:45:48 +01:00
parent 542ab62ab7
commit 31e0c07bf7

View File

@@ -222,9 +222,9 @@ void MinecraftSettingsWidget::loadSettings()
m_ui->useDiscreteGpuCheck->setChecked(settings->get("UseDiscreteGpu").toBool());
m_ui->useZink->setChecked(settings->get("UseZink").toBool());
m_ui->serverJoinGroupBox->setChecked(settings->get("JoinServerOnLaunch").toBool());
if (m_instance != nullptr) {
m_ui->serverJoinGroupBox->setChecked(settings->get("JoinServerOnLaunch").toBool());
if (auto server = settings->get("JoinServerOnLaunchAddress").toString(); !server.isEmpty()) {
m_ui->serverJoinAddress->setText(server);
m_ui->serverJoinAddressButton->setChecked(true);
@@ -240,7 +240,7 @@ void MinecraftSettingsWidget::loadSettings()
} else {
m_ui->serverJoinAddressButton->setChecked(true);
m_ui->worldJoinButton->setChecked(false);
m_ui->serverJoinAddress->setEnabled(true);
m_ui->serverJoinAddress->setEnabled(m_ui->serverJoinGroupBox->isChecked());
m_ui->worldsCb->setEnabled(false);
}