sw/source/uibase/sidebar/TableEditPanel.cxx | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)
New commits: commit 194c9eecc30837d6d4a6caaba76ef96745f09db0 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jun 30 20:05:30 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Jul 1 10:31:36 2020 +0200 Related: tdf#134360 table row/height widgets can get stuck insensitive Change-Id: I1be53f33f60c510757c67f1da8f863539ecbffdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97547 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx b/sw/source/uibase/sidebar/TableEditPanel.cxx index 4d76cc0878dd..46f75cd9a9d6 100644 --- a/sw/source/uibase/sidebar/TableEditPanel.cxx +++ b/sw/source/uibase/sidebar/TableEditPanel.cxx @@ -45,6 +45,9 @@ void TableEditPanel::NotifyItemUpdate(const sal_uInt16 nSID, const SfxItemState { case SID_ATTR_TABLE_ROW_HEIGHT: { + bool bDisabled = eState == SfxItemState::DISABLED; + m_xRowHeightEdit->set_sensitive(!bDisabled); + if (pState && eState >= SfxItemState::DEFAULT) { const SfxUInt32Item* pItem = static_cast<const SfxUInt32Item*>(pState); @@ -55,18 +58,16 @@ void TableEditPanel::NotifyItemUpdate(const sal_uInt16 nSID, const SfxItemState m_xRowHeightEdit->set_value(nNewHeight, FieldUnit::TWIP); } } - else if (eState == SfxItemState::DISABLED) - { - m_xRowHeightEdit->set_sensitive(false); - } - else - { + else if (eState != SfxItemState::DISABLED) m_xRowHeightEdit->set_text(""); - } + break; } case SID_ATTR_TABLE_COLUMN_WIDTH: { + bool bDisabled = eState == SfxItemState::DISABLED; + m_xColumnWidthEdit->set_sensitive(!bDisabled); + if (pState && eState >= SfxItemState::DEFAULT) { const SfxUInt32Item* pItem = static_cast<const SfxUInt32Item*>(pState); @@ -77,14 +78,9 @@ void TableEditPanel::NotifyItemUpdate(const sal_uInt16 nSID, const SfxItemState m_xColumnWidthEdit->set_value(nNewWidth, FieldUnit::TWIP); } } - else if (eState == SfxItemState::DISABLED) - { - m_xColumnWidthEdit->set_sensitive(false); - } - else - { + else if (eState != SfxItemState::DISABLED) m_xColumnWidthEdit->set_text(""); - } + break; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits