From c569040cc62adcbda8f6867db473210fcd80abb7 Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Tue, 21 Feb 2017 21:24:20 -0500 Subject: [PATCH] Fix for documents not being deleted when dragged to trash When drag-n-dropping a document to the trash, it would reappear in the "untitled documents" folder on the next restart. (This was introduced by bd3d8e95) --- src/gui/UBDocumentTreeWidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/UBDocumentTreeWidget.cpp b/src/gui/UBDocumentTreeWidget.cpp index 37a93ecf..b6728e4c 100644 --- a/src/gui/UBDocumentTreeWidget.cpp +++ b/src/gui/UBDocumentTreeWidget.cpp @@ -375,8 +375,10 @@ bool UBDocumentTreeWidget::moveDocument(UBDocumentProxyTreeItem* document, UBDoc QString destinationFolderName; - if (destinationFolder->isTrashFolder()) + if (destinationFolder->isTrashFolder()) { UBApplication::app()->documentController->moveDocumentToTrash(sourceFolder, document, true); + destinationFolderName = document->proxy()->metaData(UBSettings::documentGroupName).toString(); + } else { if (destinationFolder->groupName() == UBApplication::app()->documentController->defaultDocumentGroupName())