mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't show schema msg in deck upgrades
This commit is contained in:
parent
e2ed5b54c8
commit
b91b5babe2
1 changed files with 6 additions and 4 deletions
10
aqt/main.py
10
aqt/main.py
|
@ -51,7 +51,7 @@ class AnkiQt(QMainWindow):
|
||||||
def setupUI(self):
|
def setupUI(self):
|
||||||
self.col = None
|
self.col = None
|
||||||
self.state = "overview"
|
self.state = "overview"
|
||||||
self.forceFullSync = False
|
self.hideSchemaMsg = False
|
||||||
self.setupKeys()
|
self.setupKeys()
|
||||||
self.setupThreads()
|
self.setupThreads()
|
||||||
self.setupMainWindow()
|
self.setupMainWindow()
|
||||||
|
@ -217,7 +217,9 @@ Are you sure?"""):
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
def loadCollection(self):
|
def loadCollection(self):
|
||||||
|
self.hideSchemaMsg = True
|
||||||
self.col = Collection(self.pm.collectionPath())
|
self.col = Collection(self.pm.collectionPath())
|
||||||
|
self.hideSchemaMsg = False
|
||||||
self.progress.setupDB(self.col.db)
|
self.progress.setupDB(self.col.db)
|
||||||
# load overview if a single deck, otherwise deck list
|
# load overview if a single deck, otherwise deck list
|
||||||
if self.col.decks.count() > 1:
|
if self.col.decks.count() > 1:
|
||||||
|
@ -502,10 +504,10 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
||||||
If you proceed, you will need to choose between a full download or full \
|
If you proceed, you will need to choose between a full download or full \
|
||||||
upload, overwriting any changes either here or on AnkiWeb. Proceed?""")):
|
upload, overwriting any changes either here or on AnkiWeb. Proceed?""")):
|
||||||
return
|
return
|
||||||
self.forceFullSync = True
|
self.hideSchemaMsg = True
|
||||||
self.col.modSchema()
|
self.col.modSchema()
|
||||||
self.col.setMod()
|
self.col.setMod()
|
||||||
self.forceFullSync = False
|
self.hideSchemaMsg = False
|
||||||
self.onSync()
|
self.onSync()
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
|
@ -815,7 +817,7 @@ the problem and restart Anki.""")
|
||||||
if not self.inMainThread():
|
if not self.inMainThread():
|
||||||
return True
|
return True
|
||||||
# if from the full sync menu, ignore
|
# if from the full sync menu, ignore
|
||||||
if self.forceFullSync:
|
if self.hideSchemaMsg:
|
||||||
return True
|
return True
|
||||||
return askUser(_("""\
|
return askUser(_("""\
|
||||||
The requested change will require a full upload of the database when \
|
The requested change will require a full upload of the database when \
|
||||||
|
|
Loading…
Reference in a new issue