fix progress dialog preventing schema mod

https://anki.tenderapp.com/discussions/beta-testing/1868-anki-2124-beta#comment_48183062

This is an ugly hack - in the future the calling code should be updated
to perform the check prior to starting the operation instead.
This commit is contained in:
Damien Elmes 2020-03-26 21:05:02 +10:00
parent 7f16f436c3
commit fe327e32ca

View file

@ -1248,7 +1248,10 @@ and if the problem comes up again, please ask on the support site."""
##########################################################################
def onSchemaMod(self, arg):
return askUser(
progress_shown = self.progress.busy()
if progress_shown:
self.progress.finish()
ret = askUser(
_(
"""\
The requested change will require a full upload of the database when \
@ -1257,6 +1260,9 @@ waiting on another device that haven't been synchronized here yet, they \
will be lost. Continue?"""
)
)
if progress_shown:
self.progress.start()
return ret
# Advanced features
##########################################################################