summaryrefslogtreecommitdiffstats
path: root/core/settings
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-03 17:47:58 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-04 10:56:55 -0800
commit1d58d11676aa6b64cb60761759a3c06bf4eb0be6 (patch)
treedd26726c036f7b4d30af3f6d454b0895bb09c4d1 /core/settings
parentfdff61f6af1147ff691b1453764cbc55fdd40fc6 (diff)
downloadsubsurface-1d58d11676aa6b64cb60761759a3c06bf4eb0be6.tar.gz
core/settings: force sending of signal when unit type changes
When changing between METRICS <-> IMPERIAL, all type signals are emitted. This may cause double sending of some signals, but all signals will be emitted at least once. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/settings')
-rw-r--r--core/settings/qPrefUnit.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/settings/qPrefUnit.cpp b/core/settings/qPrefUnit.cpp
index 8fe2477b9..e30b684ec 100644
--- a/core/settings/qPrefUnit.cpp
+++ b/core/settings/qPrefUnit.cpp
@@ -124,6 +124,15 @@ void qPrefUnits::set_unit_system(unit_system_values value)
}
disk_unit_system(true);
emit instance()->unit_systemChanged(value);
+ emit instance()->unit_systemStringChanged(unit_system());
+ emit instance()->volumeChanged(prefs.units.volume);
+ emit instance()->volumeStringChanged(volume());
+ emit instance()->weightChanged(prefs.units.weight);
+ emit instance()->weightStringChanged(weight());
+ emit instance()->lengthChanged(prefs.units.length);
+ emit instance()->lengthStringChanged(length());
+ emit instance()->temperatureChanged(prefs.units.temperature);
+ emit instance()->temperatureStringChanged(temperature());
}
DISK_LOADSYNC_ENUM(Units, "unit_system", unit_system_values, unit_system);