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