Make better use of the new NWItem functions and do some cleanup

This commit is contained in:
Veronica Berglyd Olsen
2022-04-17 19:15:00 +02:00
parent 4eec2926cb
commit 15ede5e14c
7 changed files with 71 additions and 99 deletions
+1 -4
View File
@@ -785,10 +785,7 @@ class GuiBuildNovel(QDialog):
isNone = theItem.itemType != nwItemType.FILE
isNone |= theItem.itemLayout == nwItemLayout.NO_LAYOUT
isNone |= theItem.itemClass == nwItemClass.NO_CLASS
isNone |= theItem.itemClass == nwItemClass.ARCHIVE
isNone |= theItem.itemClass == nwItemClass.TRASH
isNone |= theItem.itemParent == self.theProject.projTree.trashRoot()
isNone |= theItem.isInactive()
isNone |= theItem.itemParent is None
isNote = theItem.itemLayout == nwItemLayout.NOTE
isNovel = not isNone and not isNote