mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
Fix the return value of aqt.main.unloadCollection() (True if there is no col...
This commit is contained in:
parent
0994bd332c
commit
a92aea1f27
1 changed files with 9 additions and 2 deletions
|
@ -258,7 +258,13 @@ how to restore from a backup.""")
|
||||||
self.moveToState("deckBrowser")
|
self.moveToState("deckBrowser")
|
||||||
|
|
||||||
def unloadCollection(self):
|
def unloadCollection(self):
|
||||||
"True if unload successful."
|
"""
|
||||||
|
Unload the collection.
|
||||||
|
|
||||||
|
This unloads a collection if ther is one and returns True if
|
||||||
|
there is no collection after the call. (Because the unload
|
||||||
|
worked or because there was no collection to start with.)
|
||||||
|
"""
|
||||||
if self.col:
|
if self.col:
|
||||||
if not self.closeAllCollectionWindows():
|
if not self.closeAllCollectionWindows():
|
||||||
return
|
return
|
||||||
|
@ -270,6 +276,7 @@ how to restore from a backup.""")
|
||||||
self.progress.finish()
|
self.progress.finish()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
# Backup and auto-optimize
|
# Backup and auto-optimize
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue