From 0f18e9ee4b817bf63821aad807dcd166ad9f65f4 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Wed, 19 Feb 2020 02:26:15 -0800 Subject: [PATCH] no default in left-side browser --- 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 817791452..239758e26 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -21,7 +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.decks import WITHOUT_EMPTY_DEFAULT from anki.lang import _, ngettext from anki.models import NoteType from anki.notes import Note @@ -1160,6 +1160,12 @@ by clicking on one on the left.""" baseName = g[0] did = g[1] children = g[5] + if str(did) == "1" and not children: + if not self.mw.col.decks.shouldDefaultBeDisplayed( + WITHOUT_EMPTY_DEFAULT + ): + # No need to test for children, we know there are not + continue item = SidebarItem( baseName, ":/icons/deck.svg",