mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
don't error when an image is dropped on itself
This commit is contained in:
parent
88cf743c8a
commit
4c3008e25c
1 changed files with 5 additions and 3 deletions
|
@ -892,9 +892,11 @@ class EditorWebView(AnkiWebView):
|
|||
oldmime = evt.mimeData()
|
||||
# coming from this program?
|
||||
if evt.source():
|
||||
assert oldmime.hasHtml()
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue