summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-28 17:16:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-28 22:31:06 +0200
commit7d69b4da74a6e826357392ade2fc3175d3092f87 (patch)
tree1ad8aaad8ee3c1c6ca1957aeea3f3d2348382c2b /cui
parent3f1d25bb033e48f9338d874fabfe0af8968379e8 (diff)
Resolves: tdf#125002 toggling on radio button generates click on another
so use toggle and ignore toggle offs Change-Id: Id6a9f3a7a9cf02d62ede00e4c246629406f9a64b Reviewed-on: https://gerrit.libreoffice.org/71481 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/tabstpge.hxx4
-rw-r--r--cui/source/tabpages/tabstpge.cxx30
2 files changed, 20 insertions, 14 deletions
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index 949877077bd2..a0c8e7ce7b5d 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -133,8 +133,8 @@ private:
DECL_LINK(DelHdl_Impl, weld::Button&, void);
DECL_LINK(DelAllHdl_Impl, weld::Button&, void);
- DECL_LINK(FillTypeCheckHdl_Impl, weld::Button&, void);
- DECL_LINK(TabTypeCheckHdl_Impl, weld::Button&, void);
+ DECL_LINK(FillTypeCheckHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(TabTypeCheckHdl_Impl, weld::ToggleButton&, void);
DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
DECL_LINK(ModifyHdl_Impl, weld::ComboBox&, void);
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index a942287b1070..12939d618a3d 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -116,22 +116,22 @@ SvxTabulatorTabPage::SvxTabulatorTabPage(TabPageParent pParent, const SfxItemSet
m_xDelBtn->connect_clicked(LINK(this,SvxTabulatorTabPage, DelHdl_Impl));
m_xDelAllBtn->connect_clicked(LINK(this,SvxTabulatorTabPage, DelAllHdl_Impl));
- Link<weld::Button&,void> aLink = LINK(this, SvxTabulatorTabPage, TabTypeCheckHdl_Impl);
- m_xLeftTab->connect_clicked(aLink);
- m_xRightTab->connect_clicked(aLink);
- m_xDezTab->connect_clicked(aLink);
- m_xCenterTab->connect_clicked(aLink);
+ Link<weld::ToggleButton&,void> aLink = LINK(this, SvxTabulatorTabPage, TabTypeCheckHdl_Impl);
+ m_xLeftTab->connect_toggled(aLink);
+ m_xRightTab->connect_toggled(aLink);
+ m_xDezTab->connect_toggled(aLink);
+ m_xCenterTab->connect_toggled(aLink);
m_xDezChar->connect_focus_out(LINK(this, SvxTabulatorTabPage, GetDezCharHdl_Impl));
m_xDezChar->set_sensitive(false);
m_xDezCharLabel->set_sensitive(false);
aLink = LINK(this, SvxTabulatorTabPage, FillTypeCheckHdl_Impl);
- m_xNoFillChar->connect_clicked(aLink);
- m_xFillPoints->connect_clicked(aLink);
- m_xFillDashLine->connect_clicked(aLink);
- m_xFillSolidLine->connect_clicked(aLink);
- m_xFillSpecial->connect_clicked(aLink);
+ m_xNoFillChar->connect_toggled(aLink);
+ m_xFillPoints->connect_toggled(aLink);
+ m_xFillDashLine->connect_toggled(aLink);
+ m_xFillSolidLine->connect_toggled(aLink);
+ m_xFillSpecial->connect_toggled(aLink);
m_xFillChar->connect_focus_out(LINK(this, SvxTabulatorTabPage, GetFillCharHdl_Impl));
m_xFillChar->set_sensitive(false);
@@ -535,8 +535,11 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, DelAllHdl_Impl, weld::Button&, void)
}
}
-IMPL_LINK(SvxTabulatorTabPage, TabTypeCheckHdl_Impl, weld::Button&, rBox, void)
+IMPL_LINK(SvxTabulatorTabPage, TabTypeCheckHdl_Impl, weld::ToggleButton&, rBox, void)
{
+ if (!rBox.get_active())
+ return;
+
SvxTabAdjust eAdj;
m_xDezChar->set_sensitive(false);
m_xDezCharLabel->set_sensitive(false);
@@ -565,8 +568,11 @@ IMPL_LINK(SvxTabulatorTabPage, TabTypeCheckHdl_Impl, weld::Button&, rBox, void)
}
}
-IMPL_LINK(SvxTabulatorTabPage, FillTypeCheckHdl_Impl, weld::Button&, rBox, void)
+IMPL_LINK(SvxTabulatorTabPage, FillTypeCheckHdl_Impl, weld::ToggleButton&, rBox, void)
{
+ if (!rBox.get_active())
+ return;
+
sal_uInt8 cFill = ' ';
m_xFillChar->set_text( "" );
m_xFillChar->set_sensitive(false);