[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Mar 12 10:38:01 UTC 2021
vcl/jsdialog/executor.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 2225d8530b4a7fa29e551f9354d679da78be6435
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Mar 12 09:35:30 2021 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Mar 12 11:37:01 2021 +0100
jsdialog: unselect treeview entry by iterator
avoid crash when using relative position from
deeper levels returned by get_selected_index
to unselect entry using unselect function
on root level
Change-Id: Iaaddb131031eb5273cb06412c976f310f7323f52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112374
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index bca3d0a98ea7..aa71178a6605 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -242,7 +242,10 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat
{
OString nRowString
= OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US);
- pTreeView->unselect(pTreeView->get_selected_index());
+
+ std::unique_ptr<weld::TreeIter> itSelected(pTreeView->make_iterator());
+ pTreeView->get_selected(itSelected.get());
+ pTreeView->unselect(*itSelected);
int nAbsPos = std::atoi(nRowString.getStr());
More information about the Libreoffice-commits
mailing list