diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-30 20:05:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-01 10:31:36 +0200 |
commit | 194c9eecc30837d6d4a6caaba76ef96745f09db0 (patch) | |
tree | 6bcf554361071d0f7d31748109a1cdd14e76f400 /sw | |
parent | 7837676c1573ec043702b165cb2dc691b54edf77 (diff) |
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 <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/sidebar/TableEditPanel.cxx | 24 |
1 files changed, 10 insertions, 14 deletions
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; } } |