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 <caolanm@redhat.com>
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 5c04ce2..7d829d3 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;