From 53f6dacf62dfd1fb37a007b6abd5006f6c2c5daa Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 22 Apr 2012 08:24:50 +0900 Subject: [PATCH] don't allow adding of cards to cram deck --- aqt/editor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aqt/editor.py b/aqt/editor.py index 81900dcb1..e0d10bd5e 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -642,7 +642,12 @@ class Editor(object): if not name.strip(): self.note.model()['did'] = 1 else: - self.note.model()['did'] = self.mw.col.decks.id(name) + did = self.mw.col.decks.id(name) + deck = self.mw.col.decks.get(did) + if deck['dyn']: + did = 1 + showInfo(_("Using default deck instead of cram deck.")) + self.note.model()['did'] = did # save tags to model m = self.note.model() m['tags'] = self.note.tags