Update classes and functions to use the item as source of main heading instead of index

This commit is contained in:
Veronica Berglyd Olsen
2022-10-17 20:15:45 +02:00
parent 5a4b7b7264
commit 8fe25d4b43
7 changed files with 15 additions and 19 deletions
+1 -2
View File
@@ -685,7 +685,6 @@ class GuiOutlineTree(QTreeWidget):
for _, tHandle, sTitle, novIdx in novStruct:
iLevel = nwHeaders.H_LEVEL.get(novIdx.level, 0)
dLevel = self.theProject.index.getHandleHeaderLevel(tHandle)
if iLevel == 0:
continue
@@ -699,7 +698,7 @@ class GuiOutlineTree(QTreeWidget):
trItem.setData(self._colIdx[nwOutline.TITLE], self.D_TITLE, sTitle)
trItem.setFont(self._colIdx[nwOutline.TITLE], self._hFonts[iLevel])
trItem.setText(self._colIdx[nwOutline.LEVEL], novIdx.level)
trItem.setIcon(self._colIdx[nwOutline.LABEL], self._dIcon[dLevel])
trItem.setIcon(self._colIdx[nwOutline.LABEL], self._dIcon[nwItem.mainHeading])
trItem.setText(self._colIdx[nwOutline.LABEL], nwItem.itemName)
trItem.setText(self._colIdx[nwOutline.LINE], sTitle[1:].lstrip("0"))
trItem.setText(self._colIdx[nwOutline.SYNOP], novIdx.synopsis)