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

preferencesAboutTextFull
Craig Watson 8 years ago
parent 5477d44e48
commit bd3d8e951b
  1. 3
      src/document/UBDocumentController.h
  2. 6
      src/gui/UBDocumentTreeWidget.cpp

@ -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
}; };
#endif /* UBDOCUMENTCONTROLLER_H_ */ #endif /* UBDOCUMENTCONTROLLER_H_ */

@ -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())

Loading…
Cancel
Save