Code cleanup in core classes and rename of parHandle to itemParent in NWItem class

This commit is contained in:
Veronica K. B. Olsen
2020-10-15 19:08:35 +02:00
parent d973f28755
commit 1923a55443
11 changed files with 47 additions and 41 deletions
+2 -2
View File
@@ -154,7 +154,7 @@ class GuiDocSplit(QDialog):
return
# Check that another folder can be created
parTree = self.theProject.projTree.getItemPath(srcItem.parHandle)
parTree = self.theProject.projTree.getItemPath(srcItem.itemParent)
if len(parTree) >= nwConst.maxDepth - 1:
self.theParent.makeAlert((
"Cannot add new folder for the document split. "
@@ -176,7 +176,7 @@ class GuiDocSplit(QDialog):
# Create the folder
fHandle = self.theProject.newFolder(
srcItem.itemName, srcItem.itemClass, srcItem.parHandle
srcItem.itemName, srcItem.itemClass, srcItem.itemParent
)
self.theParent.treeView.revealNewTreeItem(fHandle)
logger.verbose("Creating folder %s" % fHandle)