From 16210927419a79b5703786129287369f6f73b4fa Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 2 Feb 2010 00:33:07 +0900 Subject: [PATCH] hide missing decks when drawing recent decks list --- ankiqt/ui/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index c03113f79..3e4a1d10f 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -767,7 +767,8 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors") self.switchDecks = ( [(os.path.basename(x).replace(".anki", ""), x) for x in self.config['recentDeckPaths'] - if not self.deck or self.deck.path != x]) + if not self.deck or self.deck.path != x and + os.path.exists(x)]) self.switchDecks.sort() combo.addItems(QStringList([x[0] for x in self.switchDecks])) self.connect(combo, SIGNAL("activated(int)"),