Clean up Main GUI inheritance

This commit is contained in:
Veronica Berglyd Olsen
2024-05-02 22:13:35 +02:00
parent e75b5e012c
commit 2b8338f537
10 changed files with 68 additions and 96 deletions
+6
View File
@@ -171,6 +171,12 @@ class SharedData(QObject):
logger.debug("Thread Pool Max Count: %d", QThreadPool.globalInstance().maxThreadCount())
return
def closeDocument(self, tHandle: str | None = None) -> None:
"""Close the document editor, optionally a specific document."""
if tHandle is None or tHandle == self.mainGui.docEditor.docHandle:
self.mainGui.closeDocument()
return
def saveDocument(self) -> None:
"""Forward save document call to main GUI."""
self.mainGui.saveDocument()