summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-03-15 16:23:48 +0100
committerAndras Timar <andras.timar@collabora.com>2021-03-16 21:30:27 +0100
commit719184cfc844562b498d76d606163dd51b8738b4 (patch)
tree7639734dbca4377600b909c7663037e8a83d89d6
parent8bf542a13aa7272e36462ac6000a13b3a018083f (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>
-rw-r--r--vcl/jsdialog/executor.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index aa71178a6605..16096c6dcf01 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -243,9 +243,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());
@@ -262,7 +260,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);