prioritize html over images to fix MS issue (#449)

this means that copying&pasting images on linux/firefox will redownload the
image which is wasteful, but Windows users make up the majority of the
userbase
This commit is contained in:
Damien Elmes 2013-05-18 18:38:32 +09:00
parent f97abacb4a
commit 7ae90d7f7d

View File

@ -1042,14 +1042,14 @@ class EditorWebView(AnkiWebView):
# print "html", mime.html() # print "html", mime.html()
# print "urls", mime.urls() # print "urls", mime.urls()
# print "text", mime.text() # print "text", mime.text()
if mime.hasImage(): if mime.hasUrls():
return self._processImage(mime)
elif mime.hasUrls():
return self._processUrls(mime) return self._processUrls(mime)
elif mime.hasText() and (self.strip or not mime.hasHtml()): elif mime.hasText() and (self.strip or not mime.hasHtml()):
return self._processText(mime) return self._processText(mime)
elif mime.hasHtml(): elif mime.hasHtml():
return self._processHtml(mime) return self._processHtml(mime)
elif mime.hasImage():
return self._processImage(mime)
else: else:
# nothing # nothing
return QMimeData() return QMimeData()