diff --git a/pylib/anki/decks.py b/pylib/anki/decks.py index 21af1a812..60aa1fa44 100644 --- a/pylib/anki/decks.py +++ b/pylib/anki/decks.py @@ -402,11 +402,11 @@ class DeckManager: "Select a new branch." # make sure arg is an int did = int(did) - # current deck - self.col.conf["curDeck"] = did - # and active decks (current + all children) - self.col.conf["activeDecks"] = self.deck_and_child_ids(did) - self.col.setMod() + current = self.selected() + active = self.deck_and_child_ids(did) + if current != did or active != self.active(): + self.col.conf["curDeck"] = did + self.col.conf["activeDecks"] = active # don't use this, it will likely go away def update_active(self):