fix previously pasted image appearing in place of drop/text paste

mime.imageData() was returning stale data, and may have been causing
crashes as well
This commit is contained in:
Damien Elmes 2018-05-10 16:44:55 +10:00
parent 32b32bb881
commit 0de4e65950

View File

@ -906,6 +906,8 @@ class EditorWebView(AnkiWebView):
return html, False return html, False
def _processImage(self, mime): def _processImage(self, mime):
if not mime.hasImage():
return
im = QImage(mime.imageData()) im = QImage(mime.imageData())
uname = namedtmp("paste") uname = namedtmp("paste")
if self.editor.mw.pm.profile.get("pastePNG", False): if self.editor.mw.pm.profile.get("pastePNG", False):