mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 23:57:13 -05:00
don't lock the interface unless a progress handler is already active
This commit is contained in:
parent
9e20c979fb
commit
4fbb63aad5
1 changed files with 2 additions and 1 deletions
|
|
@ -84,7 +84,6 @@ class ProgressManager(object):
|
||||||
self._win.setMinimumDuration(100000)
|
self._win.setMinimumDuration(100000)
|
||||||
if immediate:
|
if immediate:
|
||||||
self._shown = True
|
self._shown = True
|
||||||
print "show"
|
|
||||||
self._win.show()
|
self._win.show()
|
||||||
else:
|
else:
|
||||||
self._shown = False
|
self._shown = False
|
||||||
|
|
@ -120,6 +119,8 @@ class ProgressManager(object):
|
||||||
self.finish()
|
self.finish()
|
||||||
|
|
||||||
def _maybeShow(self):
|
def _maybeShow(self):
|
||||||
|
if not self._levels:
|
||||||
|
return
|
||||||
delta = time.time() - self._firstTime
|
delta = time.time() - self._firstTime
|
||||||
# if more than 500ms have passed, disable the UI so the user doesn't
|
# if more than 500ms have passed, disable the UI so the user doesn't
|
||||||
# try to click again. We don't do it immediately to avoid flicker.
|
# try to click again. We don't do it immediately to avoid flicker.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue