should be changing state in collection load, not profile load

This commit is contained in:
Damien Elmes 2011-12-14 12:18:43 +09:00
parent 312af79c1e
commit 1f3f948ad1

View file

@ -186,11 +186,6 @@ Are you sure?"""):
self.raise_() self.raise_()
# maybe sync (will load DB) # maybe sync (will load DB)
self.onSync(auto=True) self.onSync(auto=True)
# load overview if a single deck, otherwise deck list
if self.col.decks.count() > 1:
self.moveToState("deckBrowser")
else:
self.moveToState("overview")
runHook("profileLoaded") runHook("profileLoaded")
def unloadProfile(self, browser=True): def unloadProfile(self, browser=True):
@ -213,7 +208,11 @@ Are you sure?"""):
def loadCollection(self): def loadCollection(self):
self.col = Collection(self.pm.collectionPath()) self.col = Collection(self.pm.collectionPath())
self.progress.setupDB(self.col.db) self.progress.setupDB(self.col.db)
self.reset(guiOnly=True) # load overview if a single deck, otherwise deck list
if self.col.decks.count() > 1:
self.moveToState("deckBrowser")
else:
self.moveToState("overview")
def unloadCollection(self): def unloadCollection(self):
if self.col: if self.col: