mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
fdff61f6af
commit
1d58d11676
1 changed files with 9 additions and 0 deletions
|
@ -124,6 +124,15 @@ void qPrefUnits::set_unit_system(unit_system_values value)
|
||||||
}
|
}
|
||||||
disk_unit_system(true);
|
disk_unit_system(true);
|
||||||
emit instance()->unit_systemChanged(value);
|
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);
|
DISK_LOADSYNC_ENUM(Units, "unit_system", unit_system_values, unit_system);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue