Prevent DeckChooser from setting filtered deck

This commit is contained in:
RumovZ 2021-07-25 08:54:39 +02:00
parent e7189f4af5
commit a7315732f6

View File

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