mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
make excessive finish() calls a noop
This commit is contained in:
parent
437297c9b5
commit
a84cc55819
1 changed files with 2 additions and 1 deletions
|
@ -110,7 +110,8 @@ class ProgressManager(object):
|
||||||
|
|
||||||
def finish(self):
|
def finish(self):
|
||||||
self._levels -= 1
|
self._levels -= 1
|
||||||
if self._levels == 0:
|
self._levels = max(0, self._levels)
|
||||||
|
if self._levels == 0 and self._win:
|
||||||
self._win.cancel()
|
self._win.cancel()
|
||||||
self._unsetBusy()
|
self._unsetBusy()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue