mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
give webkit enough time to load the image
This commit is contained in:
parent
a436e5cd7a
commit
0a1e523b24
1 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,10 @@ class DeckStats(QDialog):
|
||||||
def browser(self):
|
def browser(self):
|
||||||
# dump to a temporary file
|
# dump to a temporary file
|
||||||
self.refresh(background=True)
|
self.refresh(background=True)
|
||||||
|
# give webkit a second to load the background image
|
||||||
|
self.mw.progress.timer(200, self._browser, False)
|
||||||
|
|
||||||
|
def _browser(self):
|
||||||
name = time.strftime("-%Y-%m-%d@%H-%M-%S.png",
|
name = time.strftime("-%Y-%m-%d@%H-%M-%S.png",
|
||||||
time.localtime(time.time()))
|
time.localtime(time.time()))
|
||||||
name = "anki-"+_("stats")+name
|
name = "anki-"+_("stats")+name
|
||||||
|
|
Loading…
Reference in a new issue