fpicker/source/office/fileview.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit b6b7fb3d0a46a2d41fcd8f2319077fe280ff12f1 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Nov 24 20:27:48 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Nov 24 22:24:38 2021 +0100 tdf#145842 canceling remote file delete makes file disappear from treeview we remove the selected entries from the treeview, so the user cancel's the deletion of an entry we should unselect it from the candidates to remove. Change-Id: Ieb2258960fc647ad15d8f315a18454a0dae8a420 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125790 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx index 0e13bc0a3b55..a9e5f69329e5 100644 --- a/fpicker/source/office/fileview.cxx +++ b/fpicker/source/office/fileview.cxx @@ -642,16 +642,21 @@ void ViewTabListBox_Impl::DeleteEntries() eResult = aDlg.run(); } - if ( ( eResult == svtools::QUERYDELETE_ALL ) || - ( eResult == svtools::QUERYDELETE_YES ) ) + bool bDeleted = false; + + if (eResult == svtools::QUERYDELETE_ALL || eResult == svtools::QUERYDELETE_YES) { if ( Kill( aURL ) ) { delete reinterpret_cast<SvtContentEntry*>(mxTreeView->get_id(rCurEntry).toInt64()); mpParent->EntryRemoved( aURL ); + bDeleted = true; } } + if (!bDeleted) + mxTreeView->unselect(rCurEntry); + return false; });