From 4e989d98a91ecfb8bab36b3eae02cef73a5a2b4b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 22 Mar 2011 07:58:34 +0900 Subject: [PATCH] add switch to disable groups without forgetting the selection --- anki/deck.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/anki/deck.py b/anki/deck.py index 698bad916..023462cc3 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -21,6 +21,7 @@ import anki.cards, anki.facts, anki.models, anki.template, anki.cram defaultQconf = { 'revGroups': [], 'newGroups': [], + 'groupsOn': True, 'newPerDay': 20, 'newToday': [0, 0], # currentDay, count 'newTodayOrder': NEW_TODAY_ORD, @@ -556,6 +557,8 @@ select conf from gconf where id = (select gcid from groups where id = ?)""", gid)) def activeGroups(self, type): + if not self.qconf['groupsOn']: + return [] return self.qconf[type+"Groups"] def setActiveGroups(self, type, list):