Commit bd3d8e95 authored by Craig Watson's avatar Craig Watson

Document screen: when trashing the current document by drag-n-drop, select a new one

parent 5477d44e
......@@ -55,6 +55,8 @@ class UBDocumentController : public UBDocumentContainer
{
Q_OBJECT
friend class UBDocumentTreeWidget;
public:
UBDocumentController(UBMainWindow* mainWindow);
virtual ~UBDocumentController();
......@@ -163,5 +165,4 @@ class UBDocumentController : public UBDocumentContainer
};
#endif /* UBDOCUMENTCONTROLLER_H_ */
......@@ -375,10 +375,8 @@ bool UBDocumentTreeWidget::moveDocument(UBDocumentProxyTreeItem* document, UBDoc
QString destinationFolderName;
if (destinationFolder->isTrashFolder()) {
QString sourceFolderName = document->proxy()->metaData(UBSettings::documentGroupName).toString();
destinationFolderName = UBSettings::trashedDocumentGroupNamePrefix + sourceFolderName;
}
if (destinationFolder->isTrashFolder())
UBApplication::app()->documentController->moveDocumentToTrash(sourceFolder, document, true);
else {
if (destinationFolder->groupName() == UBApplication::app()->documentController->defaultDocumentGroupName())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment