mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Edit book: Fix pasting of image from clipboard using (Ctrl-V) not working
This commit is contained in:
parent
20ba5d597f
commit
30e25ecf21
@ -191,9 +191,9 @@ class TextEdit(PlainTextEdit):
|
|||||||
return
|
return
|
||||||
if md.hasImage():
|
if md.hasImage():
|
||||||
img = md.imageData()
|
img = md.imageData()
|
||||||
if img is not None and img.isValid():
|
if img is not None and not img.isNull():
|
||||||
data = image_to_data(img, fmt='PNG')
|
data = image_to_data(img, fmt='PNG')
|
||||||
name = add_file(get_name('dropped_image.png', data))
|
name = add_file(get_name('dropped_image.png'), data)
|
||||||
self.insert_image(get_href(name))
|
self.insert_image(get_href(name))
|
||||||
self.ensureCursorVisible()
|
self.ensureCursorVisible()
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user