summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-06-17 11:53:11 +0100
committerAndras Timar <andras.timar@collabora.com>2019-06-19 10:55:24 +0200
commit028b662fec32de731aaa16a9ac25ae43f857b5bc (patch)
tree7cf4170048299ddba997d9d2b77b6bcfb32f17ad
parentd115d6240e09410685684016a595ca70e4b4b517 (diff)
Resolves: tdf#125883 if old and new text will be the same don't change it
that way the cursor and selection is left alone Change-Id: Id6efa7e2fe27f031761271fd591de7a73a1f6963 Reviewed-on: https://gerrit.libreoffice.org/74160 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 53a2aeccd6b339bc5b7d7b403723fa48ecc5dd58)
-rw-r--r--vcl/source/window/builder.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 6f6189d11d57..ea4153161e3c 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -181,7 +181,9 @@ namespace weld
IMPL_LINK(MetricSpinButton, spin_button_output, SpinButton&, rSpinButton, void)
{
- rSpinButton.set_text(format_number(rSpinButton.get_value()));
+ OUString sNewText(format_number(rSpinButton.get_value()));
+ if (sNewText != rSpinButton.get_text())
+ rSpinButton.set_text(sNewText);
}
void MetricSpinButton::update_width_chars()