Fix drag&drop on some Linux systems

Thanks to Ab_Bc:
https://forums.ankiweb.net/t/image-occlusion-not-working-jan-2025/54523/17

Closes #3767
This commit is contained in:
Damien Elmes 2025-01-26 17:31:27 +11:00
parent 5c84a0cb5e
commit 5ccc6304e3

View file

@ -1552,7 +1552,8 @@ class EditorWebView(AnkiWebView):
extended = self._wantsExtendedPaste()
mime = evt.mimeData()
assert mime is not None
cursor_pos = self.mapFromGlobal(QCursor.pos())
evt_pos = evt.position()
cursor_pos = QPoint(int(evt_pos.x()), int(evt_pos.y()))
if evt.source() and mime.hasHtml():
# don't filter html from other fields