mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
work around a crash on windows when adding media
This commit is contained in:
parent
ec0f35a2e1
commit
0d3fc59917
1 changed files with 1 additions and 0 deletions
|
@ -736,6 +736,7 @@ class Editor(object):
|
||||||
|
|
||||||
def addMedia(self, path, canDelete=False):
|
def addMedia(self, path, canDelete=False):
|
||||||
html = self._addMedia(path, canDelete)
|
html = self._addMedia(path, canDelete)
|
||||||
|
self.mw.app.processEvents()
|
||||||
self.web.eval("setFormat('inserthtml', %s);" % simplejson.dumps(html))
|
self.web.eval("setFormat('inserthtml', %s);" % simplejson.dumps(html))
|
||||||
|
|
||||||
def _addMedia(self, path, canDelete=False):
|
def _addMedia(self, path, canDelete=False):
|
||||||
|
|
Loading…
Reference in a new issue