summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-28 17:16:36 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2019-04-28 23:00:22 +0200
commit8b92cd8ff345d86e5b1cfee09e221826d135afc4 (patch)
treedaac2ca9b009ced4e002f275019c7bdfdde3a5e4 /cui
parente67f8ea50e470a7f751a9d14d9bf0213c1edd047 (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/71482 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.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 e79cfc767949..ade5a184c75e 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -137,8 +137,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 d47645ee4801..729d6fcc28de 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -123,22 +123,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);
@@ -537,8 +537,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);
@@ -567,8 +570,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);