mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
remove default deck from filter list
This commit is contained in:
parent
bdf10d9649
commit
a0bd232cfd
1 changed files with 7 additions and 1 deletions
|
@ -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,6 +1313,11 @@ by clicking on one on the left."""
|
|||
subm.addSeparator()
|
||||
addDecks(subm, children)
|
||||
else:
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue