Outline should not show non-exported items
This commit is contained in:
+7
-2
@@ -529,13 +529,18 @@ class NWIndex():
|
||||
# Extract Data
|
||||
##
|
||||
|
||||
def getNovelStructure(self):
|
||||
def getNovelStructure(self, skipExcluded=True):
|
||||
"""Builds a list of all titles in the novel, in the correct
|
||||
order as they appear in the tree view and in the respective
|
||||
document files, but skipping all note files.
|
||||
"""
|
||||
theStructure = []
|
||||
for tHandle in self.theProject.projTree.handles():
|
||||
for tItem in self.theProject.projTree:
|
||||
if tItem is None:
|
||||
continue
|
||||
if not tItem.isExported and skipExcluded:
|
||||
continue
|
||||
tHandle = tItem.itemHandle
|
||||
if tHandle not in self.novelIndex:
|
||||
continue
|
||||
for sTitle in sorted(self.novelIndex[tHandle].keys()):
|
||||
|
||||
@@ -319,7 +319,6 @@ class GuiProjectOutline(QTreeWidget):
|
||||
if they are hidden. This ensures that showing and hiding columns
|
||||
is fast and doesn't require a rebuild of the tree.
|
||||
"""
|
||||
|
||||
self.clear()
|
||||
|
||||
if self.firstView:
|
||||
@@ -347,7 +346,7 @@ class GuiProjectOutline(QTreeWidget):
|
||||
currChapter = None
|
||||
currScene = None
|
||||
|
||||
for titleKey in self.theIndex.getNovelStructure():
|
||||
for titleKey in self.theIndex.getNovelStructure(skipExcluded=True):
|
||||
|
||||
if len(titleKey) < 16:
|
||||
continue
|
||||
@@ -404,7 +403,6 @@ class GuiProjectOutline(QTreeWidget):
|
||||
def _createTreeItem(self, tHandle, sTitle):
|
||||
"""Populate a tree item with all the column values.
|
||||
"""
|
||||
|
||||
nwItem = self.theProject.projTree[tHandle]
|
||||
novIdx = self.theIndex.novelIndex[tHandle][sTitle]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user