vcl/source/window/builder.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
New commits: commit 973a3dd9623107c18c6765d0b247aa34018a0447 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Nov 15 17:16:19 2018 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Nov 15 21:55:51 2018 +0100 force rerender on unit change Change-Id: I7a64b2e200bf0c50ea636be8aac1249713044103 Reviewed-on: https://gerrit.libreoffice.org/63438 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 95a1fb996cd4..b2dbeba41233 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -256,13 +256,17 @@ namespace weld void MetricSpinButton::set_unit(FieldUnit eUnit) { - int step, page; - get_increments(step, page, m_eSrcUnit); - int value = get_value(m_eSrcUnit); - m_eSrcUnit = eUnit; - set_increments(step, page, m_eSrcUnit); - set_value(value, m_eSrcUnit); - update_width_chars(); + if (eUnit != m_eSrcUnit) + { + int step, page; + get_increments(step, page, m_eSrcUnit); + int value = get_value(m_eSrcUnit); + m_eSrcUnit = eUnit; + set_increments(step, page, m_eSrcUnit); + set_value(value, m_eSrcUnit); + spin_button_output(*m_xSpinButton); + update_width_chars(); + } } int MetricSpinButton::ConvertValue(int nValue, FieldUnit eInUnit, FieldUnit eOutUnit) const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits