mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
possible fix for recursion bug in maybeShow()
This commit is contained in:
parent
d9af6288e1
commit
18c8d6766d
1 changed files with 3 additions and 1 deletions
|
@ -293,11 +293,13 @@ class ProgressWin(object):
|
||||||
self.firstTime = time.time()
|
self.firstTime = time.time()
|
||||||
self.lastTime = time.time()
|
self.lastTime = time.time()
|
||||||
self.app = QApplication.instance()
|
self.app = QApplication.instance()
|
||||||
|
self.shown = False
|
||||||
if max == 0:
|
if max == 0:
|
||||||
self.diag.setLabelText(_("Processing..."))
|
self.diag.setLabelText(_("Processing..."))
|
||||||
|
|
||||||
def maybeShow(self):
|
def maybeShow(self):
|
||||||
if time.time() - self.firstTime > 2:
|
if time.time() - self.firstTime > 2 and not self.shown:
|
||||||
|
self.shown = True
|
||||||
self.diag.show()
|
self.diag.show()
|
||||||
|
|
||||||
def update(self, label=None, value=None, process=True):
|
def update(self, label=None, value=None, process=True):
|
||||||
|
|
Loading…
Reference in a new issue