diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py index c97b391d3..a2e10f122 100644 --- a/qt/aqt/__init__.py +++ b/qt/aqt/__init__.py @@ -69,7 +69,7 @@ except ImportError as e: # - make preferences modal? cmd+q does wrong thing -from aqt import addcards, browser, editcurrent # isort:skip +from aqt import addcards, addons, browser, editcurrent # isort:skip from aqt import stats, about, preferences, mediasync # isort:skip @@ -77,6 +77,7 @@ class DialogManager: _dialogs: Dict[str, list] = { "AddCards": [addcards.AddCards, None], + "AddonsDialog": [addons.AddonsDialog, None], "Browser": [browser.Browser, None], "EditCurrent": [editcurrent.EditCurrent, None], "DeckStats": [stats.DeckStats, None], diff --git a/qt/aqt/addons.py b/qt/aqt/addons.py index ab65e5903..29954f78d 100644 --- a/qt/aqt/addons.py +++ b/qt/aqt/addons.py @@ -218,7 +218,7 @@ class AddonManager: ) def onAddonsDialog(self) -> None: - AddonsDialog(self) + aqt.dialogs.open("AddonsDialog", self) # Metadata ###################################################################### @@ -731,6 +731,8 @@ class AddonsDialog(QDialog): def reject(self) -> None: saveGeom(self, "addons") + aqt.dialogs.markClosed("AddonsDialog") + return QDialog.reject(self) def name_for_addon_list(self, addon: AddonMeta) -> str: