mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
should be changing state in collection load, not profile load
This commit is contained in:
parent
312af79c1e
commit
1f3f948ad1
1 changed files with 5 additions and 6 deletions
11
aqt/main.py
11
aqt/main.py
|
@ -186,11 +186,6 @@ Are you sure?"""):
|
|||
self.raise_()
|
||||
# maybe sync (will load DB)
|
||||
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")
|
||||
|
||||
def unloadProfile(self, browser=True):
|
||||
|
@ -213,7 +208,11 @@ Are you sure?"""):
|
|||
def loadCollection(self):
|
||||
self.col = Collection(self.pm.collectionPath())
|
||||
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):
|
||||
if self.col:
|
||||
|
|
Loading…
Reference in a new issue