From dc3ef60c75b2182e81ea10697823f74758cbfe5d Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 7 Apr 2012 18:41:29 +0900 Subject: [PATCH] ignore image drag if qt doesn't provide html for it --- aqt/editor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aqt/editor.py b/aqt/editor.py index 075b09f19..5d5e5884e 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -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