mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
fix import screen appearing before progress dialog closes
This commit is contained in:
parent
f2bb7eb5ae
commit
429cb2ce7f
1 changed files with 4 additions and 3 deletions
|
@ -336,7 +336,10 @@ def importFile(mw, file):
|
||||||
return
|
return
|
||||||
mw.progress.start(immediate=True)
|
mw.progress.start(immediate=True)
|
||||||
try:
|
try:
|
||||||
importer.run()
|
try:
|
||||||
|
importer.run()
|
||||||
|
finally:
|
||||||
|
mw.progress.finish()
|
||||||
except zipfile.BadZipfile:
|
except zipfile.BadZipfile:
|
||||||
showWarning(invalidZipMsg())
|
showWarning(invalidZipMsg())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -360,8 +363,6 @@ Unable to import from a read-only file."""))
|
||||||
tooltip(log)
|
tooltip(log)
|
||||||
else:
|
else:
|
||||||
showText(log)
|
showText(log)
|
||||||
finally:
|
|
||||||
mw.progress.finish()
|
|
||||||
mw.reset()
|
mw.reset()
|
||||||
|
|
||||||
def invalidZipMsg():
|
def invalidZipMsg():
|
||||||
|
|
Loading…
Reference in a new issue