summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorAttila Szűcs <szucs.attila3@nisz.hu>2021-01-07 19:07:23 +0100
committerLászló Németh <nemeth@numbertext.org>2021-01-20 17:23:24 +0100
commit3d2a431da1126f4924f6cd7e5abac6488cd480e7 (patch)
tree1f1a7314b376aa331354f37c091f97e669be18d1 /vcl/source/app
parentbd015917e8967b4e3c5325f01484fb53e00f9340 (diff)
tdf#139115 vcl tree list: add new toggle behaviors
at clicking on list items with checkboxes to clean-up generic VCL plugin commit 2471d6f44c7e8ecbe86a90eeb593b899a08a7408 (tdf#116675 vcl tree list: toggle by label click (e.g. in AutoFilter)). This limits the new toggle-always to ScCheckListMenuControl (e.g. AutoFilter). set_clicks_to_toggle() options to set the effect of the click on a treeview list item: 0 == clicking never toggles the checkbox (default setting) 1 == clicking always toggles the checkbox 2 == clicking only toggles the checkbox of a selected list item, i.e. the first click selects a not selected list item, and only the second click toggles its checkbox. It would be better if we could set this information in the .ui files, but I did not find a good way for that. A good place in the code to call this function can be found by searching for the .ui filename. Co-authored-by: Tibor Nagy (NISZ) Change-Id: I5c72d710508fc397f2b6f959d7680b23f8dc6f67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108947 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/salvtables.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 06d8c8f89533..6183b1a3ac24 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4061,6 +4061,11 @@ void SalInstanceTreeView::set_toggle(const weld::TreeIter& rIter, TriState eStat
set_toggle(rVclIter.iter, eState, col);
}
+void SalInstanceTreeView::set_clicks_to_toggle(int nToggleBehavior)
+{
+ m_xTreeView->SetClicksToToggle(nToggleBehavior);
+}
+
void SalInstanceTreeView::set_extra_row_indent(const weld::TreeIter& rIter, int nIndentLevel)
{
weld::TreeIter& rNonConstIter = const_cast<weld::TreeIter&>(rIter);