[Libreoffice-commits] core.git: vcl/jsdialog
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 7 10:31:40 UTC 2021
vcl/jsdialog/executor.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit d4437f5071422b8f64f18c4be3b1a0208ee49da3
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Mar 15 16:23:48 2021 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Apr 7 12:31:00 2021 +0200
jsdialog: simplify unselect for treeview
Change-Id: Iaadd8122d735103d89e4acb65bef1ca8c1ad2e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112532
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113679
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 7462f6aa3095..0e3fdc358eaa 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -221,9 +221,7 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat
OString nRowString
= OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US);
- std::unique_ptr<weld::TreeIter> itSelected(pTreeView->make_iterator());
- pTreeView->get_selected(itSelected.get());
- pTreeView->unselect(*itSelected);
+ pTreeView->unselect_all();
int nAbsPos = std::atoi(nRowString.getStr());
@@ -240,7 +238,7 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat
= OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US);
int nRow = std::atoi(nRowString.getStr());
- pTreeView->unselect(pTreeView->get_selected_index());
+ pTreeView->unselect_all();
pTreeView->select(nRow);
pTreeView->set_cursor(nRow);
LOKTrigger::trigger_changed(*pTreeView);
More information about the Libreoffice-commits
mailing list