mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -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
|
||||
if md.hasImage():
|
||||
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')
|
||||
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.ensureCursorVisible()
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user