Improve the way the project tree is managed and elements deleted.

This commit is contained in:
Veronica K. B. Olsen committed 2020-09-17 14:03:51 +02:00
1 parent 9bca006a45
commit 27ee82aad0
4 files changed
+47 -27

No files matched your search

+5 -5
View File
@@ -378,11 +378,11 @@ class GuiProjectTree(QTreeWidget):
return True
def deleteItem(self, tHandle=None, alreadyAsked=False, askForTrash=False):
"""Delete items from the tree. Note that this does not delete
the item from the item tree in the project object. However,
since this is only meta data, there isn't really a need to do
that to save memory. Items not in the tree are not saved to the
project file, so a loaded project will be clean anyway.
"""Delete an item from the project tree. As a first step, files are
moved to the Trash folder. Permanent deletion is a second step. This
second step also deletes the item from the project object as well as
delete the files on disk. Folders are deleted if they're empty only,
and the deletion is always permanent.
"""
if tHandle is None:
tHandle = self.getSelectedHandle()