Fix duplicate tool dialogs issue

This commit is contained in:
Veronica Berglyd Olsen
2024-06-11 00:53:50 +02:00
parent cc61c5321e
commit 69cd443999
+2
View File
@@ -797,6 +797,7 @@ class GuiMain(QMainWindow):
def showBuildManuscriptDialog(self) -> None:
"""Open the build manuscript dialog."""
if SHARED.hasProject:
if not (dialog := SHARED.findTopLevelWidget(GuiManuscript)):
dialog = GuiManuscript(self)
dialog.activateDialog()
dialog.loadContent()
@@ -815,6 +816,7 @@ class GuiMain(QMainWindow):
def showWritingStatsDialog(self) -> None:
"""Open the session stats dialog."""
if SHARED.hasProject:
if not (dialog := SHARED.findTopLevelWidget(GuiWritingStats)):
dialog = GuiWritingStats(self)
dialog.activateDialog()
dialog.populateGUI()