summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-02-09 09:38:58 +0100
committerJan Holesovsky <kendy@collabora.com>2021-02-09 13:51:19 +0100
commitd00cad178c8830bada68bd9d81dc0c4466160ab6 (patch)
tree118cc5e7334591d6f89e1bfef1e1d63e426c3196
parentjsdialog: handle standard buttons like help (diff)
downloadcore-d00cad178c8830bada68bd9d81dc0c4466160ab6.tar.gz
core-d00cad178c8830bada68bd9d81dc0c4466160ab6.zip
jsdialog: single activation property for treeview
Change-Id: Iaaeab7f14f1a05c38f41c4beb774a0980844fdb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110621 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--include/vcl/treelistbox.hxx1
-rw-r--r--vcl/source/treelist/svtabbx.cxx2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx
index 537e4abc7a8d..8301ac1d9434 100644
--- a/include/vcl/treelistbox.hxx
+++ b/include/vcl/treelistbox.hxx
@@ -733,6 +733,7 @@ public:
// Make single click "activate" a row like a double-click normally does
void SetActivateOnSingleClick(bool bEnable) { mbActivateOnSingleClick = bEnable; }
+ bool GetActivateOnSingleClick() { return mbActivateOnSingleClick; }
// Make mouse over a row "select" a row like a single-click normally does
void SetHoverSelection(bool bEnable) { mbHoverSelection = bEnable; }
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 4cfb34668907..6f07fe00301a 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -117,6 +117,8 @@ boost::property_tree::ptree SvTabListBox::DumpAsPropertyTree()
{
boost::property_tree::ptree aTree(SvTreeListBox::DumpAsPropertyTree());
+ aTree.put("singleclickactivate", GetActivateOnSingleClick());
+
bool bCheckButtons = static_cast<int>(nTreeFlags & SvTreeFlags::CHKBTN);
aTree.push_back(std::make_pair("entries", lcl_DumpEntryAndSiblings(First(), this, bCheckButtons)));