Move the hasProject logic into the shared class

This commit is contained in:
Veronica Berglyd Olsen
2023-08-13 19:23:32 +02:00
parent fd181b18a6
commit 8154293d92
8 changed files with 71 additions and 55 deletions
+3 -3
View File
@@ -563,7 +563,7 @@ class GuiProjectTree(QTreeWidget):
make sure the item is added in a place it can be added, and that
other meta data is set correctly to ensure a valid project tree.
"""
if not self.mainGui.hasProject:
if not SHARED.hasProject:
logger.error("No project open")
return False
@@ -787,7 +787,7 @@ class GuiProjectTree(QTreeWidget):
can be called on any item, and will check whether to attempt a
permanent deletion or moving the item to Trash.
"""
if not self.mainGui.hasProject:
if not SHARED.hasProject:
logger.error("No project open")
return False
@@ -823,7 +823,7 @@ class GuiProjectTree(QTreeWidget):
function only asks for confirmation once, and calls the regular
deleteItem function for each document in the Trash folder.
"""
if not self.mainGui.hasProject:
if not SHARED.hasProject:
logger.error("No project open")
return False