diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-09-06 15:15:19 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-06 16:13:44 -0700 |
commit | e71b049498eaae05f7686445be320e90ca2f630e (patch) | |
tree | 335174bac350b3f1aaf18db58addcab619bba992 /core/settings/qPrefGeocoding.cpp | |
parent | d88f86579372d356a7fd33e9fadb38a76b44c757 (diff) | |
download | subsurface-e71b049498eaae05f7686445be320e90ca2f630e.tar.gz |
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>
Diffstat (limited to 'core/settings/qPrefGeocoding.cpp')
-rw-r--r-- | core/settings/qPrefGeocoding.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/settings/qPrefGeocoding.cpp b/core/settings/qPrefGeocoding.cpp index 7bb043e0f..02b8b154a 100644 --- a/core/settings/qPrefGeocoding.cpp +++ b/core/settings/qPrefGeocoding.cpp @@ -32,7 +32,7 @@ void qPrefGeocoding::set_first_taxonomy_category(taxonomy_category value) void qPrefGeocoding::disk_first_taxonomy_category(bool doSync) { if (doSync) - qPrefPrivate::propSetValue(group + "/cat0", prefs.geocoding.category[0]); + qPrefPrivate::propSetValue(group + "/cat0", prefs.geocoding.category[0], default_prefs.geocoding.category[0]); else prefs.geocoding.category[0] = (enum taxonomy_category)qPrefPrivate::propValue(group + "/cat0", default_prefs.geocoding.category[0]).toInt(); } @@ -49,7 +49,7 @@ void qPrefGeocoding::set_second_taxonomy_category(taxonomy_category value) void qPrefGeocoding::disk_second_taxonomy_category(bool doSync) { if (doSync) - qPrefPrivate::propSetValue(group + "/cat1", prefs.geocoding.category[1]); + qPrefPrivate::propSetValue(group + "/cat1", prefs.geocoding.category[1], default_prefs.geocoding.category[1]); else prefs.geocoding.category[1] = (enum taxonomy_category)qPrefPrivate::propValue(group + "/cat1", default_prefs.geocoding.category[1]).toInt(); } @@ -66,7 +66,7 @@ void qPrefGeocoding::set_third_taxonomy_category(taxonomy_category value) void qPrefGeocoding::disk_third_taxonomy_category(bool doSync) { if (doSync) - qPrefPrivate::propSetValue(group + "/cat2", prefs.geocoding.category[2]); + qPrefPrivate::propSetValue(group + "/cat2", prefs.geocoding.category[2], default_prefs.geocoding.category[2]); else prefs.geocoding.category[2] = (enum taxonomy_category)qPrefPrivate::propValue(group + "/cat2", default_prefs.geocoding.category[2]).toInt(); } |