don't error when an image is dropped on itself

This commit is contained in:
Damien Elmes 2012-04-06 07:36:48 +09:00
parent 88cf743c8a
commit 4c3008e25c

View file

@ -892,9 +892,11 @@ class EditorWebView(AnkiWebView):
oldmime = evt.mimeData()
# coming from this program?
if evt.source():
assert oldmime.hasHtml()
mime = QMimeData()
mime.setHtml(self._filteredHTML(oldmime.html()))
if oldmime.hasHtml():
mime = QMimeData()
mime.setHtml(self._filteredHTML(oldmime.html()))
else:
mime = oldmime
else:
mime = self._processMime(oldmime)
# create a new event with the new mime data