From 1c390218fc30c5f3d62ca74b9f5098c1665d9e70 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 14 Jan 2018 12:16:47 +1000 Subject: [PATCH] fixes to progress window - make sure _shown reset to False on finish() - ignore calls to .update() after finish() called, which can happen with async signals in the sync code --- aqt/progress.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aqt/progress.py b/aqt/progress.py index 1e43994d6..076dba6ba 100644 --- a/aqt/progress.py +++ b/aqt/progress.py @@ -134,10 +134,12 @@ class ProgressManager: return if maybeShow: self._maybeShow() + if not self._shown: + return elapsed = time.time() - self._lastUpdate if label: self._win.form.label.setText(label) - if self._max and self._shown: + if self._max: self._counter = value or (self._counter+1) self._win.form.progressBar.setValue(self._counter) if process and elapsed >= 0.2: @@ -187,6 +189,7 @@ class ProgressManager: self.app.processEvents(QEventLoop.ExcludeUserInputEvents) self._win.cancel() self._win = None + self._shown = False self._unsetBusy() def _setBusy(self):