[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 1 19:13:58 UTC 2020
sw/source/uibase/sidebar/TableEditPanel.cxx | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
New commits:
commit c4eb732bc38156d2d6c373c6ce3520eecf323d32
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 30 20:05:30 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jul 1 21:13:25 2020 +0200
Related: tdf#134360 table row/height widgets can get stuck insensitive
Change-Id: I1be53f33f60c510757c67f1da8f863539ecbffdb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97573
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at 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;
}
}
More information about the Libreoffice-commits
mailing list