summaryrefslogtreecommitdiff
path: root/sw/source/ui/table
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-13 17:03:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-08-14 16:33:31 +0200
commitbfd3f939325e53c9dc85d2486316927c2b34eaf8 (patch)
tree48ddf478fcf1e8b97ac2fe6c003e13675fcdc51e /sw/source/ui/table
parent02ac9b042d544dc8cf261017e0f31721f30642cd (diff)
tdf#135693 rerun the callbacks on inconsistency just once
Change-Id: I250cf11b816e91b521378c132e4ee8065956bb73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100679 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui/table')
-rw-r--r--sw/source/ui/table/tabledlg.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 9e2259e6ad65..77cf26c43042 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -267,7 +267,7 @@ IMPL_LINK( SwFormatTablePage, ValueChangedHdl, weld::MetricSpinButton&, rEdit, v
ModifyHdl(rEdit);
}
-void SwFormatTablePage::ModifyHdl(const weld::MetricSpinButton& rEdit)
+void SwFormatTablePage::ModifyHdl(const weld::MetricSpinButton& rEdit, bool bAllowInconsistencies)
{
SwTwips nCurWidth = static_cast< SwTwips >(m_xWidthMF->DenormalizePercent(m_xWidthMF->get_value(FieldUnit::TWIP)));
SwTwips nPrevWidth = nCurWidth;
@@ -371,9 +371,10 @@ void SwFormatTablePage::ModifyHdl(const weld::MetricSpinButton& rEdit)
// tdf#135021 if the user changed the width spinbutton, and in this
// ModifyHdl we changed the value of that width spinbutton, then rerun
// the ModifyHdl on the replaced value so the left/right/width value
- // relationships are consistent
- if (&rEdit == m_xWidthMF->get())
- ModifyHdl(rEdit);
+ // relationships are consistent.
+ // But (tdf#135693) only make one effort of rectifying the inconsistency
+ if (&rEdit == m_xWidthMF->get() && !bAllowInconsistencies)
+ ModifyHdl(rEdit, true);
}
bModified = true;