make sure the load callback is reset each time html changed

This commit is contained in:
Damien Elmes 2011-12-04 15:39:01 +09:00
parent da2d4073c9
commit 16fd34e8d9

View file

@ -77,8 +77,7 @@ class AnkiWebView(QWebView):
# handler should return true if event should be swallowed
self._keyHandler = handler
def setHtml(self, html, loadCB=None):
if loadCB:
self._loadFinishedCB = loadCB
self._loadFinishedCB = loadCB
QWebView.setHtml(self, html)
def stdHtml(self, body, css="", bodyID="", loadCB=None, head=""):
self.setHtml("""