diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-22 19:44:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-22 22:01:01 +0200 |
commit | ec11b7330fab72dc56d847c7c3691fddbb18096e (patch) | |
tree | d91ef1cbd0f38ca1212aba5ab9fb81ec923c7815 /svtools/source/misc | |
parent | fcce0642c101429247a8be886df5a469aeb390a2 (diff) |
Related: tdf#133189 values not updated when units changed
do it for all of them, not just the writer one. A braver move.
Change-Id: Ib1f635ccc6a70c1ef00f82449bd351c82da7a13d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94707
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source/misc')
-rw-r--r-- | svtools/source/misc/unitconv.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx index 8076b6890196..93dab6ada967 100644 --- a/svtools/source/misc/unitconv.cxx +++ b/svtools/source/misc/unitconv.cxx @@ -26,8 +26,10 @@ void SetFieldUnit(weld::MetricSpinButton& rField, FieldUnit eUnit, bool bAll) { int nMin, nMax; rField.get_range(nMin, nMax, FieldUnit::TWIP); + int nValue = rField.get_value(FieldUnit::TWIP); nMin = rField.denormalize(nMin); nMax = rField.denormalize(nMax); + nValue = rField.denormalize(nValue); if (!bAll) { @@ -78,6 +80,8 @@ void SetFieldUnit(weld::MetricSpinButton& rField, FieldUnit eUnit, bool bAll) nMax = rField.normalize(nMax); rField.set_range(nMin, nMax, FieldUnit::TWIP); } + + rField.set_value(rField.normalize(nValue), FieldUnit::TWIP); } void SetMetricValue(weld::MetricSpinButton& rField, int nCoreValue, MapUnit eUnit) |