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.
This commit is contained in:
tt2468 2021-08-26 19:07:26 -07:00
parent 43a889c1d4
commit 1fc60aba92

View File

@ -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;