summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-24 20:27:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-24 22:24:38 +0100
commitb6b7fb3d0a46a2d41fcd8f2319077fe280ff12f1 (patch)
treeeb014d745f1e08918c9ac0e412933cd74f29a748 /fpicker
parente6f75af74c7f35feb8a22959a2f876af7f385ca2 (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/fileview.cxx9
1 files changed, 7 insertions, 2 deletions
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;
});