From 57f655c1194a283a1935bf92c2fba1c700f81da2 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 22 Mar 2009 11:42:14 +0900 Subject: [PATCH] move sync on load to after deck load --- ankiqt/ui/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index bc96aa55d..76ae3e044 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -84,6 +84,9 @@ class AnkiQt(QMainWindow): ui.splash.update() ui.splash.finish(self) self.show() + if (self.deck and self.config['syncOnLoad'] and + self.deck.syncName): + self.syncDeck(interactive=False) def setupMainWindow(self): # main window @@ -617,10 +620,10 @@ To upgrade an old deck, download Anki 0.9.8.7.""")) # try a command line argument if available if args: f = unicode(args[0], sys.getfilesystemencoding()) - return self.loadDeck(f) + return self.loadDeck(f, sync=False) # try recent deck paths for path in self.config['recentDeckPaths']: - r = self.loadDeck(path, interactive=False) + r = self.loadDeck(path, interactive=False, sync=False) if r: return r self.onNew(initial=True)