Apply settings immediately
This commit is contained in:
parent
4cc926a627
commit
2d3509ae56
|
@ -2117,6 +2117,7 @@ SettingsDialog *MainWindow::CreateSettingsDialog() {
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
connect(settings_dialog, SIGNAL(accepted()), SLOT(ReloadAllSettings()));
|
connect(settings_dialog, SIGNAL(accepted()), SLOT(ReloadAllSettings()));
|
||||||
|
connect(settings_dialog, SIGNAL(ReloadSettings()), SLOT(ReloadAllSettings()));
|
||||||
|
|
||||||
// Allows custom notification preview
|
// Allows custom notification preview
|
||||||
connect(settings_dialog, SIGNAL(NotificationPreview(OSD::Behaviour, QString, QString)), SLOT(HandleNotificationPreview(OSD::Behaviour, QString, QString)));
|
connect(settings_dialog, SIGNAL(NotificationPreview(OSD::Behaviour, QString, QString)), SLOT(HandleNotificationPreview(OSD::Behaviour, QString, QString)));
|
||||||
|
|
|
@ -232,9 +232,12 @@ void SettingsDialog::AddPage(Page id, SettingsPage *page, QTreeWidgetItem *paren
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::Save() {
|
void SettingsDialog::Save() {
|
||||||
|
|
||||||
for (const PageData &data : pages_.values()) {
|
for (const PageData &data : pages_.values()) {
|
||||||
data.page_->Save();
|
data.page_->Save();
|
||||||
}
|
}
|
||||||
|
emit ReloadSettings();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::accept() {
|
void SettingsDialog::accept() {
|
||||||
|
|
|
@ -113,6 +113,7 @@ class SettingsDialog : public QDialog {
|
||||||
void ComboBoxLoadFromSettings(QSettings &s, QComboBox *combobox, QString setting, QString default_value);
|
void ComboBoxLoadFromSettings(QSettings &s, QComboBox *combobox, QString setting, QString default_value);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void ReloadSettings();
|
||||||
void NotificationPreview(OSD::Behaviour, QString, QString);
|
void NotificationPreview(OSD::Behaviour, QString, QString);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
Loading…
Reference in New Issue