class: ImageEditor
authorClaus Gittinger <cg@exept.de>
Sun, 23 Nov 2014 14:46:15 +0100
changeset 3164 890b62a044be
parent 3163 e7f3add79489
child 3165 c4e94501002c
class: ImageEditor changed: #doNewImageFromClipboard warn if clipboard contains no image.
ImageEditor.st
--- a/ImageEditor.st	Sat Nov 22 02:15:52 2014 +0100
+++ b/ImageEditor.st	Sun Nov 23 14:46:15 2014 +0100
@@ -6713,6 +6713,13 @@
     self checkModified ifFalse:[ ^ self ].
 
     image := imageEditView clipBoard.
+    image isImageOrForm ifFalse:[
+        image := Image readFrom:(image asString) onError:nil.
+        image isNil ifTrue:[
+            Dialog warn:'Clipboard does not contain an image I can use/understand'.
+            ^ self.
+        ].
+    ].
     imageEditView image:image.
 
     image notNil ifTrue:[