From fe327e32caa2fa3db3618ca77fa02c0f4b8ab007 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 26 Mar 2020 21:05:02 +1000 Subject: [PATCH] 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. --- qt/aqt/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qt/aqt/main.py b/qt/aqt/main.py index 03d89c6f8..3f605db6f 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -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 ##########################################################################