mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
make sure the load callback is reset each time html changed
This commit is contained in:
parent
da2d4073c9
commit
16fd34e8d9
1 changed files with 1 additions and 2 deletions
|
@ -77,8 +77,7 @@ class AnkiWebView(QWebView):
|
||||||
# handler should return true if event should be swallowed
|
# handler should return true if event should be swallowed
|
||||||
self._keyHandler = handler
|
self._keyHandler = handler
|
||||||
def setHtml(self, html, loadCB=None):
|
def setHtml(self, html, loadCB=None):
|
||||||
if loadCB:
|
self._loadFinishedCB = loadCB
|
||||||
self._loadFinishedCB = loadCB
|
|
||||||
QWebView.setHtml(self, html)
|
QWebView.setHtml(self, html)
|
||||||
def stdHtml(self, body, css="", bodyID="", loadCB=None, head=""):
|
def stdHtml(self, body, css="", bodyID="", loadCB=None, head=""):
|
||||||
self.setHtml("""
|
self.setHtml("""
|
||||||
|
|
Loading…
Reference in a new issue