diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-03-15 16:23:48 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-04-07 12:31:00 +0200 |
commit | d4437f5071422b8f64f18c4be3b1a0208ee49da3 (patch) | |
tree | 6659b05bc4101d91231fb1f880adcfb7aacbc2ed /vcl | |
parent | 8e6203bd8f4390698f83a74a04f901437a9a61a3 (diff) |
jsdialog: simplify unselect for treeview
Change-Id: Iaadd8122d735103d89e4acb65bef1ca8c1ad2e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112532
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113679
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/jsdialog/executor.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
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); |