Make sure deleted documents are closed if open

This commit is contained in:
Veronica Berglyd Olsen
2024-11-21 22:24:34 +01:00
parent 7ed619cf2e
commit e0b27317f3
3 changed files with 8 additions and 2 deletions
+1
View File
@@ -174,6 +174,7 @@ class NWProject:
project entry and a document file if it exists.
"""
if self._tree.checkType(tHandle, nwItemType.FILE):
SHARED.closeDocument(tHandle)
doc = self._storage.getDocument(tHandle)
if not doc.deleteDocument():
SHARED.error(