Make "Save Preferences" button mutate "prefs" struct.

Clicking Save in the preferences dialog will now cause
the GUI to immediately reflect the latest settings (just
as it behaved in 4.5).

Signed-off-by: K. Heller <pestophagous@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
K. \"pestophagous\" Heller 2015-11-15 20:55:50 -08:00 committed by Dirk Hohndel
parent f44c98d9c5
commit 99ed01e571

View file

@ -124,6 +124,7 @@ void PreferencesDialog::applyRequested(bool closeIt)
connect(page, &AbstractPreferencesWidget::settingsChanged, this, &PreferencesDialog::settingsChanged, Qt::UniqueConnection);
page->syncSettings();
}
loadPreferences(); //TODO: Move loadPreferences out of qthelper.cpp
emit settingsChanged();
if (closeIt)
accept();
@ -143,6 +144,7 @@ void PreferencesDialog::defaultsRequested()
Q_FOREACH(AbstractPreferencesWidget *page, pages) {
page->refreshSettings();
}
loadPreferences(); //TODO: Move loadPreferences out of qthelper.cpp
emit settingsChanged();
accept();
}