From 62fcfdfef4790f2569838e5f3ef39ee4e33028b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Szymon=20K=C5=82os?= Date: Tue, 9 Feb 2021 09:38:58 +0100 Subject: [PATCH] jsdialog: single activation property for treeview MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Iaaeab7f14f1a05c38f41c4beb774a0980844fdb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110621 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111959 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- include/vcl/toolkit/treelistbox.hxx | 1 + vcl/source/treelist/svtabbx.cxx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx index 3cd50dddee65..d11a006d4c1a 100644 --- a/include/vcl/toolkit/treelistbox.hxx +++ b/include/vcl/toolkit/treelistbox.hxx @@ -677,6 +677,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 613d1831bf2b..ab1736f32120 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -115,6 +115,8 @@ void SvTabListBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) { SvTreeListBox::DumpAsPropertyTree(rJsonWriter); + rJsonWriter.put("singleclickactivate", GetActivateOnSingleClick()); + bool bCheckButtons = static_cast(nTreeFlags & SvTreeFlags::CHKBTN); auto entriesNode = rJsonWriter.startArray("entries"); -- 2.11.4.GIT