mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 10:16:21 +01:00
Edit book: Fix pasting of image from clipboard using (Ctrl-V) not working
This commit is contained in:
parent
20ba5d597f
commit
30e25ecf21
1 changed files with 2 additions and 2 deletions
|
|
@ -191,9 +191,9 @@ def add_file(name, data, mt=None):
|
|||
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…
Reference in a new issue