From a7315732f64d6041377703495a7a40fb0d78f9cc Mon Sep 17 00:00:00 2001 From: RumovZ Date: Sun, 25 Jul 2021 08:54:39 +0200 Subject: [PATCH] Prevent DeckChooser from setting filtered deck --- qt/aqt/deckchooser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/aqt/deckchooser.py b/qt/aqt/deckchooser.py index c1661dd6c..19261ddc8 100644 --- a/qt/aqt/deckchooser.py +++ b/qt/aqt/deckchooser.py @@ -70,7 +70,8 @@ class DeckChooser(QHBoxLayout): self._update_button_label() def _ensure_selected_deck_valid(self) -> None: - if not self.mw.col.decks.get(self._selected_deck_id, default=False): + deck = self.mw.col.decks.get(self._selected_deck_id, default=False) + if not deck or deck["dyn"]: self.selected_deck_id = DEFAULT_DECK_ID def _update_button_label(self) -> None: