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

Loading…
Cancel
Save