summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-06-17 11:53:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-06-17 15:03:57 +0200
commit53a2aeccd6b339bc5b7d7b403723fa48ecc5dd58 (patch)
tree9bc37e49d10f07f8c533039ef20943000c6d7d85 /vcl
parent92199ce4e544d17b4ceceefacf078c04996b57db (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>
Diffstat (limited to 'vcl')
-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()