ignore image drag if qt doesn't provide html for it

This commit is contained in:
Damien Elmes 2012-04-07 18:41:29 +09:00
parent 8a2ca46a7a
commit dc3ef60c75

View file

@ -900,7 +900,10 @@ class EditorWebView(AnkiWebView):
mime = QMimeData()
mime.setHtml(self._filteredHTML(oldmime.html()))
else:
mime = oldmime
# old qt on linux won't give us html when dragging an image;
# in that case just do the default action (which is to ignore
# the drag)
return AnkiWebView.dropEvent(self, evt)
else:
mime = self._processMime(oldmime)
# create a new event with the new mime data