Fix bug with clearing class tag lists

This commit is contained in:
Veronica Berglyd Olsen
2023-11-15 21:46:32 +01:00
parent 2fc8e43e71
commit b94e012f8f
+7 -1
View File
@@ -121,7 +121,7 @@ class GuiDocViewerPanel(QWidget):
def clearClassTabs(self) -> None:
"""Clear all the class tabs"""
for cTab in self.kwTabs.values():
cTab.clear()
cTab.clearContent()
return
##
@@ -349,6 +349,12 @@ class _ViewPanelKeyWords(QTreeWidget):
"""Return the number of items in the list."""
return self.topLevelItemCount()
def clearContent(self) -> None:
"""Clear the list."""
self._tagMap = {}
self.clear()
return
def addUpdateEntry(self, tag: str, name: str, iItem: IndexItem, hItem: IndexHeading) -> None:
"""Add a new entry, or update an existing one."""
nwItem = iItem.item