Move connection creation earlier to cause it to be triggered on setting

the current value to the combobox
This commit is contained in:
AdenKoperczak 2024-11-04 09:51:52 -05:00
parent 3f52f79210
commit 73d3eedcdc

View file

@ -521,12 +521,6 @@ void SettingsDialogImpl::SetupGeneralTab()
settings::GeneralSettings& generalSettings =
settings::GeneralSettings::Instance();
theme_.SetSettingsVariable(generalSettings.theme());
SCWX_SETTINGS_COMBO_BOX(theme_,
self_->ui->themeComboBox,
types::UiStyleIterator(),
types::GetUiStyleName);
theme_.SetResetButton(self_->ui->resetThemeButton);
QObject::connect(
self_->ui->themeComboBox,
@ -542,6 +536,13 @@ void SettingsDialogImpl::SetupGeneralTab()
self_->ui->resetThemeFileButton->setEnabled(themeFileEnabled);
});
theme_.SetSettingsVariable(generalSettings.theme());
SCWX_SETTINGS_COMBO_BOX(theme_,
self_->ui->themeComboBox,
types::UiStyleIterator(),
types::GetUiStyleName);
theme_.SetResetButton(self_->ui->resetThemeButton);
themeFile_.SetSettingsVariable(generalSettings.theme_file());
themeFile_.SetEditWidget(self_->ui->themeFileLineEdit);
themeFile_.SetResetButton(self_->ui->resetThemeFileButton);