if add selected when card is filtered, use home deck as default (#748)

This commit is contained in:
Damien Elmes 2013-05-22 11:51:42 +09:00
parent ad1e2a0291
commit eb3df9a067

View File

@ -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: