svx/source/sidebar/possize/PosSizePropertyPanel.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 8d17ad0bb36b5c330e839fdd7517b37fa72002ae
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Dec 2 15:57:58 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sat Dec 3 00:01:11 2022 +0000

    Resolves: tdf#146610 don't reformat MetricSpinButtons if unit didn't change
    
    Change-Id: I58f36b18b456e6d3ccd7482b681e5273ca132499
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143600
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 5c04ce2706b6..7d829d324aab 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -864,7 +864,10 @@ void PosSizePropertyPanel::MetricState( SfxItemState 
eState, const SfxPoolItem*
 
     // #i124409# use the given Item to get the correct UI unit and initialize 
it
     // and the Fields using it
-    meDlgUnit = GetCurrentUnit(eState,pState);
+    FieldUnit eDlgUnit = GetCurrentUnit(eState, pState);
+    if (eDlgUnit == meDlgUnit)
+        return;
+    meDlgUnit = eDlgUnit;
 
     if (mxMtrPosX->get_text().isEmpty())
         bPosXBlank = true;

Reply via email to