Put loading functions in a separate Method and called it, when Add Dictionaries Window is closed.

This commit is contained in:
2025-10-28 13:50:20 +01:00
parent 2f7b04534d
commit e3168163c2
2 changed files with 20 additions and 8 deletions
+8 -1
View File
@@ -824,12 +824,19 @@ class GuiMain(QMainWindow):
@pyqtSlot()
def showDictionariesDialog(self) -> None:
"""Show the download dictionaries dialog."""
"""Show the download dictionaries dialog and update language list when closed."""
dialog = GuiDictionaries(self)
dialog.activateDialog()
if not dialog.initDialog():
dialog.close()
SHARED.error(self.tr("Could not initialise the dialog."))
return
# Update the spell check languages menu when the dialog is closed
def onDialogFinished():
self.mainMenu.updateSpellCheckLanguages()
dialog.finished.connect(onDialogFinished)
##
# Main Window Actions