From 6c45af855805feb5f195141f8c43a47d3cdc5717 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 4 Dec 2013 23:33:21 +0530 Subject: [PATCH] Error message when pasting with no img in the clipboard --- src/calibre/gui2/tweak_book/editor/canvas.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/tweak_book/editor/canvas.py b/src/calibre/gui2/tweak_book/editor/canvas.py index fe15731326..92ecf0ff44 100644 --- a/src/calibre/gui2/tweak_book/editor/canvas.py +++ b/src/calibre/gui2/tweak_book/editor/canvas.py @@ -186,6 +186,9 @@ class Canvas(QWidget): img = QImage(md.imageData()) if not img.isNull(): self.undo_stack.push(Replace(img, _('Paste image'), self)) + else: + error_dialog(self, _('No image'), _( + 'No image available in the clipboard'), show=True) def break_cycles(self): self.undo_stack.clear()