From a0bd232cfd1a541853e9d5b961cafc42b86cec46 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Wed, 19 Feb 2020 01:03:27 -0800 Subject: [PATCH] remove default deck from filter list --- qt/aqt/browser.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index 301683d95..7eed68596 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -21,6 +21,7 @@ from anki import hooks from anki.cards import Card from anki.collection import _Collection from anki.consts import * +from anki.decks import WITHOUT_LEAF_DEFAULT from anki.lang import _, ngettext from anki.models import NoteType from anki.notes import Note @@ -1312,7 +1313,12 @@ by clicking on one on the left.""" subm.addSeparator() addDecks(subm, children) else: - parent.addItem(shortname, self._filterFunc("deck", name)) + if did != 1 or self.col.decks.shouldDefaultBeDisplayed( + WITHOUT_EMPTY_DEFAULT + # no need to check for children, we know + # there are none in this else branch + ): + parent.addItem(shortname, self._filterFunc("deck", name)) # fixme: could rewrite to avoid calculating due # in the future alldecks = self.col.sched.deckDueTree()