Fix some annotations and add deleteLater to non-modal dialogs
This commit is contained in:
@@ -551,7 +551,7 @@ class NWIndex:
|
||||
return 0
|
||||
|
||||
def getTableOfContents(
|
||||
self, rHandle: str, maxDepth: int, skipExcl: bool = True
|
||||
self, rHandle: str | None, maxDepth: int, skipExcl: bool = True
|
||||
) -> list[tuple[str, int, str, int]]:
|
||||
"""Generate a table of contents up to a maximum depth."""
|
||||
tOrder = []
|
||||
|
||||
@@ -139,6 +139,7 @@ class GuiAbout(QDialog):
|
||||
def _doClose(self) -> None:
|
||||
"""Close the dialog"""
|
||||
self.close()
|
||||
self.deleteLater()
|
||||
return
|
||||
|
||||
##
|
||||
|
||||
@@ -98,6 +98,7 @@ class GuiProjectDetails(NPagedDialog):
|
||||
"""Save settings and close the dialog."""
|
||||
self._saveGuiSettings()
|
||||
self.close()
|
||||
self.deleteLater()
|
||||
return
|
||||
|
||||
##
|
||||
@@ -428,7 +429,7 @@ class GuiProjectDetailsContents(QWidget):
|
||||
# Internal Functions
|
||||
##
|
||||
|
||||
def _prepareData(self, rootHandle: str) -> None:
|
||||
def _prepareData(self, rootHandle: str | None) -> None:
|
||||
"""Extract the information from the project index."""
|
||||
logger.debug("Populating ToC from handle '%s'", rootHandle)
|
||||
self._theToC = SHARED.project.index.getTableOfContents(rootHandle, 2)
|
||||
|
||||
Reference in New Issue
Block a user