diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index e9addae4..13402dc2 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -2357,6 +2357,10 @@ void UBDocumentController::moveIndexesToTrash(const QModelIndexList &list, UBDoc } } + else + { + setDocument(NULL); + } docModel->moveIndexes(list, docModel->trashIndex());