summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-20 09:38:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-20 12:38:35 +0200
commit39001d0ad8de4aa0b8f643aeadc1ec415e1d66e2 (patch)
tree29df39777fe89bcbdadf1333dcdc266acb79ae16 /cui/source
parent5792b08d3762117dfa28ea08638d79a5b01957ad (diff)
use toggle instead of click for RadioButton
doesn't seem sensible to listen to the prop checkbox in this handler Change-Id: If514b5a9072e789b6b2cbfc990714e236335d99c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115854 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/splitcelldlg.cxx11
-rw-r--r--cui/source/inc/splitcelldlg.hxx2
2 files changed, 7 insertions, 6 deletions
diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx
index f58b8cc0ece5..45511a59b794 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -28,9 +28,8 @@ SvxSplitTableDlg::SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical,
, mnMaxVertical(nMaxVertical)
, mnMaxHorizontal(nMaxHorizontal)
{
- m_xHorzBox->connect_clicked(LINK(this, SvxSplitTableDlg, ClickHdl));
- m_xPropCB->connect_clicked(LINK(this, SvxSplitTableDlg, ClickHdl));
- m_xVertBox->connect_clicked(LINK(this, SvxSplitTableDlg, ClickHdl));
+ m_xHorzBox->connect_toggled(LINK(this, SvxSplitTableDlg, ToggleHdl));
+ m_xVertBox->connect_toggled(LINK(this, SvxSplitTableDlg, ToggleHdl));
if (mnMaxVertical < 2)
{
@@ -51,9 +50,11 @@ SvxSplitTableDlg::SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical,
}
}
-IMPL_LINK(SvxSplitTableDlg, ClickHdl, weld::Button&, rButton, void)
+IMPL_LINK(SvxSplitTableDlg, ToggleHdl, weld::ToggleButton&, rButton, void)
{
- const bool bIsVert = &rButton == m_xVertBox.get();
+ if (!rButton.get_active())
+ return;
+ const bool bIsVert = m_xVertBox->get_active();
tools::Long nMax = bIsVert ? mnMaxVertical : mnMaxHorizontal;
m_xPropCB->set_sensitive(!bIsVert);
m_xCountEdit->set_max(nMax);
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
index 86655a2a5755..22e61e0ff7fc 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -35,7 +35,7 @@ private:
public:
SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical, tools::Long nMaxVertical, tools::Long nMaxHorizontal);
- DECL_LINK(ClickHdl, weld::Button&, void);
+ DECL_LINK(ToggleHdl, weld::ToggleButton&, void);
bool IsHorizontal() const;
bool IsProportional() const;