Merge branch 'main' into release_1.0

This commit is contained in:
Veronica K. B. Olsen
2021-01-03 15:12:56 +01:00
3 changed files with 15 additions and 14 deletions
+7 -1
View File
@@ -395,14 +395,19 @@ class GuiOutline(QTreeWidget):
self.treeMap[titleKey] = tItem
if tLevel == "H1":
currTitle = tItem
self.addTopLevelItem(tItem)
currTitle = tItem
currChapter = None
currScene = None
elif tLevel == "H2":
if currTitle is None:
self.addTopLevelItem(tItem)
else:
currTitle.addChild(tItem)
currChapter = tItem
currScene = None
elif tLevel == "H3":
if currChapter is None:
if currTitle is None:
@@ -412,6 +417,7 @@ class GuiOutline(QTreeWidget):
else:
currChapter.addChild(tItem)
currScene = tItem
elif tLevel == "H4":
if currScene is None:
if currChapter is None:
+1 -1
View File
@@ -329,7 +329,7 @@ class GuiOutlineDetails(QScrollArea):
def _formatTags(self, theRefs, theKey):
"""Format the tags as clickable links.
"""
if theKey not in theKey:
if theKey not in theRefs:
return ""
refTags = []
for tTag in theRefs[theKey]: