summaryrefslogtreecommitdiff
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:30 +0200
commit7c9b2d971a211fb721f8d529c50ca4f953517b9c (patch)
tree068f2f4684728c11d349ad3f3990159aa851f5a0
parent0c8ac718247d374741c878b161d901c279d00bc8 (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/74158 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 72d7ec18a1c0..8e64c3a70881 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -185,7 +185,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()