Merge pull request #865 from hgiesel/configaction

Open AddonsDialog via dialog manager
This commit is contained in:
Damien Elmes 2020-12-28 10:36:02 +10:00 committed by GitHub
commit 623c5b305a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -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],

View File

@ -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: