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 ...@@ -55,6 +55,8 @@ class UBDocumentController : public UBDocumentContainer
{ {
Q_OBJECT Q_OBJECT
friend class UBDocumentTreeWidget;
public: public:
UBDocumentController(UBMainWindow* mainWindow); UBDocumentController(UBMainWindow* mainWindow);
virtual ~UBDocumentController(); virtual ~UBDocumentController();
...@@ -163,5 +165,4 @@ class UBDocumentController : public UBDocumentContainer ...@@ -163,5 +165,4 @@ class UBDocumentController : public UBDocumentContainer
}; };
#endif /* UBDOCUMENTCONTROLLER_H_ */ #endif /* UBDOCUMENTCONTROLLER_H_ */
...@@ -375,10 +375,8 @@ bool UBDocumentTreeWidget::moveDocument(UBDocumentProxyTreeItem* document, UBDoc ...@@ -375,10 +375,8 @@ bool UBDocumentTreeWidget::moveDocument(UBDocumentProxyTreeItem* document, UBDoc
QString destinationFolderName; QString destinationFolderName;
if (destinationFolder->isTrashFolder()) { if (destinationFolder->isTrashFolder())
QString sourceFolderName = document->proxy()->metaData(UBSettings::documentGroupName).toString(); UBApplication::app()->documentController->moveDocumentToTrash(sourceFolder, document, true);
destinationFolderName = UBSettings::trashedDocumentGroupNamePrefix + sourceFolderName;
}
else { else {
if (destinationFolder->groupName() == UBApplication::app()->documentController->defaultDocumentGroupName()) 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