mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
drop events from anywhere in anki should preserve formatting
This commit is contained in:
parent
157801621c
commit
d0c9beddfd
1 changed files with 3 additions and 3 deletions
|
@ -788,8 +788,8 @@ class EditorWebView(AnkiWebView):
|
|||
|
||||
def dropEvent(self, evt):
|
||||
oldmime = evt.mimeData()
|
||||
# coming from us?
|
||||
if evt.source() == self:
|
||||
# coming from this program?
|
||||
if evt.source():
|
||||
# if they're copying just an image, we need to turn it into html
|
||||
# again
|
||||
txt = ""
|
||||
|
@ -800,7 +800,7 @@ class EditorWebView(AnkiWebView):
|
|||
unicode(oldmime.urls()[0].toString()))
|
||||
mime.setHtml(txt)
|
||||
else:
|
||||
mime.setText(oldmime.text())
|
||||
mime.setHtml(oldmime.html())
|
||||
else:
|
||||
mime = self._processMime(oldmime)
|
||||
# create a new event with the new mime data
|
||||
|
|
Loading…
Reference in a new issue