Clean up handling of root and class info for items

This commit is contained in:
Veronica Berglyd Olsen
2022-04-03 17:45:17 +02:00
parent 37970bd446
commit bdde6a2080
7 changed files with 121 additions and 100 deletions
+2 -4
View File
@@ -780,12 +780,13 @@ class GuiBuildNovel(QDialog):
if theItem is None:
return False
if not theItem.isExported and not ignoreFlag:
if not (theItem.isExported or ignoreFlag):
return False
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.itemParent is None
@@ -799,9 +800,6 @@ class GuiBuildNovel(QDialog):
if isNovel and not novelFiles:
return False
if self.theProject.projTree.getItemClass(theItem.itemHandle) == nwItemClass.ARCHIVE:
return False
return True
def _saveDocument(self, theFmt):