vcl/jsdialog/executor.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit d4437f5071422b8f64f18c4be3b1a0208ee49da3
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Mon Mar 15 16:23:48 2021 +0100
Commit:     Szymon Kłos <szymon.k...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113679
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.k...@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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to