From 1d58d11676aa6b64cb60761759a3c06bf4eb0be6 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Fri, 3 Jan 2020 17:47:58 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- core/settings/qPrefUnit.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/settings') 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); -- cgit v1.2.3-70-g09d2