diff --git a/quick_note_and_deck_buttons.py b/quick_note_and_deck_buttons.py index da63579d4..c07ef236c 100644 --- a/quick_note_and_deck_buttons.py +++ b/quick_note_and_deck_buttons.py @@ -116,6 +116,7 @@ from aqt.modelchooser import ModelChooser from aqt.deckchooser import DeckChooser +from aqt.addcards import AddCards from aqt.utils import tooltip from anki.hooks import wrap @@ -197,7 +198,13 @@ def change_model_to(chooser, model_name): cdeck = chooser.deck.decks.current() cdeck['mid'] = m['id'] chooser.deck.decks.save(cdeck) - runHook("currentModelChanged") + window = chooser.widget.parent() + if window and isinstance(window, AddCards): + # Workaround for "Multiple Windows" add-on: + window.onModelChange() + chooser.onReset() + else: + runHook("currentModelChanged") chooser.mw.reset()