qPref: only save settings that aren't the default

This brings us back to the previous behavior.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2018-09-06 15:15:19 -07:00
parent d88f865793
commit e71b049498
7 changed files with 30 additions and 27 deletions

View file

@ -90,7 +90,7 @@ void qPrefDisplay::set_divelist_font(const QString &value)
void qPrefDisplay::disk_divelist_font(bool doSync)
{
if (doSync)
qPrefPrivate::propSetValue(group + "/divelist_font", prefs.divelist_font);
qPrefPrivate::propSetValue(group + "/divelist_font", prefs.divelist_font, default_prefs.divelist_font);
else
setCorrectFont();
}
@ -110,7 +110,7 @@ void qPrefDisplay::set_font_size(double value)
void qPrefDisplay::disk_font_size(bool doSync)
{
if (doSync)
qPrefPrivate::propSetValue(group + "/font_size", prefs.font_size);
qPrefPrivate::propSetValue(group + "/font_size", prefs.font_size, default_prefs.font_size);
else
setCorrectFont();
}