From eb3df9a067f52373d6abb40cb1c8cf74f95599d6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 22 May 2013 11:51:42 +0900 Subject: [PATCH] if add selected when card is filtered, use home deck as default (#748) --- aqt/deckchooser.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aqt/deckchooser.py b/aqt/deckchooser.py index 81dc81f83..ce3a3a2fa 100644 --- a/aqt/deckchooser.py +++ b/aqt/deckchooser.py @@ -36,7 +36,15 @@ class DeckChooser(QHBoxLayout): col = self.mw.col did = col.conf['curDeck'] if col.decks.isDyn(did): - did = 1 + # if they're reviewing, try default to current card + c = self.mw.reviewer.card + if self.mw.state == "review" and c: + if not c.odid: + did = c.did + else: + did = c.odid + else: + did = 1 self.deck.setText(self.mw.col.decks.nameOrNone( did) or _("Default")) else: