Reorder alert county settings initialization to ensure county name displays on startup

This commit is contained in:
Dan Paulat 2023-12-08 10:04:11 -06:00
parent f143186ea5
commit 2f62319958

View file

@ -941,10 +941,6 @@ void SettingsDialogImpl::SetupAudioTab()
alertAudioLongitude_.SetResetButton( alertAudioLongitude_.SetResetButton(
self_->ui->resetAlertAudioLongitudeButton); self_->ui->resetAlertAudioLongitudeButton);
alertAudioCounty_.SetSettingsVariable(audioSettings.alert_county());
alertAudioCounty_.SetEditWidget(self_->ui->alertAudioCountyLineEdit);
alertAudioCounty_.SetResetButton(self_->ui->resetAlertAudioCountyButton);
auto alertAudioLayout = auto alertAudioLayout =
static_cast<QGridLayout*>(self_->ui->alertAudioGroupBox->layout()); static_cast<QGridLayout*>(self_->ui->alertAudioGroupBox->layout());
@ -1033,6 +1029,10 @@ void SettingsDialogImpl::SetupAudioTab()
self_->ui->alertAudioCountyLabel->setText( self_->ui->alertAudioCountyLabel->setText(
QString::fromStdString(countyName)); QString::fromStdString(countyName));
}); });
alertAudioCounty_.SetSettingsVariable(audioSettings.alert_county());
alertAudioCounty_.SetEditWidget(self_->ui->alertAudioCountyLineEdit);
alertAudioCounty_.SetResetButton(self_->ui->resetAlertAudioCountyButton);
} }
void SettingsDialogImpl::SetupTextTab() void SettingsDialogImpl::SetupTextTab()