mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
ensure that anki restarted before check db run
This commit is contained in:
parent
0753cf726d
commit
7ed1c458e8
1 changed files with 6 additions and 0 deletions
|
@ -74,6 +74,7 @@ class AnkiQt(QMainWindow):
|
||||||
self.loadPlugins()
|
self.loadPlugins()
|
||||||
self.setupAutoUpdate()
|
self.setupAutoUpdate()
|
||||||
self.rebuildPluginsMenu()
|
self.rebuildPluginsMenu()
|
||||||
|
self.errorOccurred = False
|
||||||
# run after-init hook
|
# run after-init hook
|
||||||
try:
|
try:
|
||||||
runHook('init')
|
runHook('init')
|
||||||
|
@ -159,6 +160,7 @@ Please do not file a bug report with Anki.<br><br>""")
|
||||||
else:
|
else:
|
||||||
txt = stdText
|
txt = stdText
|
||||||
if self.pool:
|
if self.pool:
|
||||||
|
self.parent.errorOccurred = True
|
||||||
ui.utils.showText(txt + self.pool[0:10000].replace(
|
ui.utils.showText(txt + self.pool[0:10000].replace(
|
||||||
"\n", "<br>"))
|
"\n", "<br>"))
|
||||||
self.pool = ""
|
self.pool = ""
|
||||||
|
@ -2136,6 +2138,10 @@ it to your friends.
|
||||||
|
|
||||||
def onCheckDB(self):
|
def onCheckDB(self):
|
||||||
"True if no problems"
|
"True if no problems"
|
||||||
|
if self.errorOccurred:
|
||||||
|
ui.utils.showWarning(_(
|
||||||
|
"Please restart Anki before checking the DB."))
|
||||||
|
return
|
||||||
if not ui.utils.askUser(_("""\
|
if not ui.utils.askUser(_("""\
|
||||||
This operation will find and fix some common problems.<br>
|
This operation will find and fix some common problems.<br>
|
||||||
<br>
|
<br>
|
||||||
|
|
Loading…
Reference in a new issue