[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jan 7 00:24:06 UTC 2020
sw/source/ui/chrdlg/numpara.cxx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit e4a58d8df28451952d55604b1ab97b55467b6e05
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 6 10:48:34 2020 +0000
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Jan 7 01:23:34 2020 +0100
Resolves: tdf#129527 enable/disable edit-style button at the right time
Change-Id: I70b14ad8d96a2564c06a47608e5cf2c438cf7d38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86265
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index fe7458310a6d..025d19e2d727 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -66,12 +66,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(weld::Container* pPage, weld::Dialo
m_xNewStartNumberCB->set_state(TRISTATE_FALSE);
m_xCountParaCB->set_state(TRISTATE_FALSE);
m_xRestartParaCountCB->set_state(TRISTATE_FALSE);
-
- int numSelectPos = m_xNumberStyleLB->get_active();
- if (numSelectPos == 0)
- m_xEditNumStyleBtn->set_sensitive(false);
- else
- m_xEditNumStyleBtn->set_sensitive(true);
+ m_xEditNumStyleBtn->set_sensitive(false);
const SfxPoolItem* pItem;
SfxObjectShell* pObjSh;
@@ -213,6 +208,8 @@ void SwParagraphNumTabPage::Reset(const SfxItemSet* rSet)
m_xNumberStyleLB->set_active(-1);
}
+ EditNumStyleSelectHdl_Impl(*m_xNumberStyleLB);
+
m_xNumberStyleLB->save_value();
eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART );
@@ -301,7 +298,8 @@ IMPL_LINK_NOARG(SwParagraphNumTabPage, LineCountHdl_Impl, weld::ToggleButton&, v
IMPL_LINK_NOARG(SwParagraphNumTabPage, EditNumStyleSelectHdl_Impl, weld::ComboBox&, void)
{
int numSelectPos = m_xNumberStyleLB->get_active();
- if (numSelectPos == 0)
+ // 0 is "None" and -1 is unselected state
+ if (numSelectPos == 0 || numSelectPos == -1)
m_xEditNumStyleBtn->set_sensitive(false);
else
m_xEditNumStyleBtn->set_sensitive(true);
More information about the Libreoffice-commits
mailing list