Moved the project tree into its own iterable class NWTree
This commit is contained in:
@@ -164,12 +164,12 @@ class TextFile():
|
||||
* Items that appear in the TRASH folder
|
||||
"""
|
||||
|
||||
theItem = self.theProject.getItem(tHandle)
|
||||
theItem = self.theProject.projTree[tHandle]
|
||||
isNone = theItem.itemType != nwItemType.FILE
|
||||
isNone |= theItem.itemLayout == nwItemLayout.NO_LAYOUT
|
||||
isNone |= theItem.itemClass == nwItemClass.NO_CLASS
|
||||
isNone |= theItem.itemClass == nwItemClass.TRASH
|
||||
isNone |= theItem.parHandle == self.theProject.trashRoot
|
||||
isNone |= theItem.parHandle == self.theProject.projTree.trashRoot()
|
||||
isNote = theItem.itemLayout == nwItemLayout.NOTE
|
||||
isNovel = not isNone and not isNote
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ class Tokenizer():
|
||||
def setText(self, theHandle, theText=None):
|
||||
|
||||
self.theHandle = theHandle
|
||||
self.theItem = self.theProject.getItem(theHandle)
|
||||
self.theItem = self.theProject.projTree[theHandle]
|
||||
|
||||
if theText is not None:
|
||||
# If the text is set, just use that
|
||||
|
||||
Reference in New Issue
Block a user