From 1fc60aba92674c266dcdfc2c6b402ac3cc7baad4 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Thu, 26 Aug 2021 19:07:26 -0700 Subject: [PATCH] SettingsDialog: Fix Generate Password button enable logic On OBS load, the Generate Password button would be enabled regardless of if authentication was enabled, or if the password was overridden. --- src/forms/SettingsDialog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/forms/SettingsDialog.cpp b/src/forms/SettingsDialog.cpp index 7ae79186..44a330b1 100644 --- a/src/forms/SettingsDialog.cpp +++ b/src/forms/SettingsDialog.cpp @@ -70,6 +70,7 @@ void SettingsDialog::showEvent(QShowEvent *event) ui->enableAuthenticationCheckBox->setChecked(conf->AuthRequired); ui->serverPasswordLineEdit->setText(conf->ServerPassword); ui->serverPasswordLineEdit->setEnabled(conf->AuthRequired); + ui->generatePasswordButton->setEnabled(conf->AuthRequired); ui->serverPortSpinBox->setValue(conf->ServerPort); if (conf->PortOverridden) { @@ -79,6 +80,7 @@ void SettingsDialog::showEvent(QShowEvent *event) if (conf->PasswordOverridden) { ui->enableAuthenticationCheckBox->setEnabled(false); ui->serverPasswordLineEdit->setEnabled(false); + ui->generatePasswordButton->setEnabled(false); } passwordManuallyEdited = false;