Rename item isInactive to isInactiveClass

This commit is contained in:
Veronica Berglyd Olsen
2023-02-28 22:40:02 +01:00
parent 8a4785d9a3
commit cfd1b950d3
5 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ class NWIndex:
return False
logger.debug("Indexing item with handle '%s'", tHandle)
if theItem.isInactive():
if theItem.isInactiveClass():
self._scanInactive(theItem, theText)
else:
self._scanActive(tHandle, theItem, theText, itemTags)
+1 -1
View File
@@ -294,7 +294,7 @@ class NWItem:
"""
return self._class in (nwItemClass.NOVEL, nwItemClass.ARCHIVE, nwItemClass.TRASH)
def isInactive(self):
def isInactiveClass(self):
"""Returns true if the item is in an inactive class.
"""
return self._class in (nwItemClass.NO_CLASS, nwItemClass.ARCHIVE, nwItemClass.TRASH)
+1 -1
View File
@@ -1404,7 +1404,7 @@ class GuiProjectTree(QTreeWidget):
self.theProject.tree.updateItemData(mHandle)
# Update the index
if nwItemS.isInactive():
if nwItemS.isInactiveClass():
self.theProject.index.deleteHandle(mHandle)
else:
self.theProject.index.reIndexHandle(mHandle)
+2 -2
View File
@@ -367,7 +367,7 @@ class GuiBuildNovel(QDialog):
iRow = 0
self.rootSelection = {}
for tHandle, nwItem in self.theProject.tree.iterRoots(None):
if not nwItem.isInactive():
if not nwItem.isInactiveClass():
rootLabel = QLabel(nwItem.itemName)
rootLabel.setWordWrap(True)
@@ -823,7 +823,7 @@ class GuiBuildNovel(QDialog):
isNone = not theItem.isFileType()
isNone |= theItem.itemLayout == nwItemLayout.NO_LAYOUT
isNone |= theItem.isInactive()
isNone |= theItem.isInactiveClass()
isNone |= theItem.itemParent is None
isNote = theItem.isNoteLayout()
isNovel = not isNone and not isNote