Update new item functions in project class

This commit is contained in:
Veronica Berglyd Olsen
2022-04-16 20:55:54 +02:00
parent da13fbff08
commit 61f5425662
6 changed files with 45 additions and 43 deletions
+2 -2
View File
@@ -250,7 +250,7 @@ class GuiProjectTree(QTreeWidget):
# If we're still here, add the file or folder
if itemType == nwItemType.FILE:
tHandle = self.theProject.newFile(self.tr("New File"), itemClass, pHandle)
tHandle = self.theProject.newFile(self.tr("New File"), pHandle)
elif itemType == nwItemType.FOLDER:
if len(parTree) >= nwConst.MAX_DEPTH - 1:
@@ -261,7 +261,7 @@ class GuiProjectTree(QTreeWidget):
"Maximum folder depth has been reached."
), nwAlert.ERROR)
return False
tHandle = self.theProject.newFolder(self.tr("New Folder"), itemClass, pHandle)
tHandle = self.theProject.newFolder(self.tr("New Folder"), pHandle)
else:
logger.error("Failed to add new item")