#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Fri, 20 Jan 2017 23:34:24 +0100
changeset 5415 71799d6dbfe3
parent 5414 641d2f0d748c
child 5416 9da5642194a6
#FEATURE by cg class: ImageEditView changed: #performSpecialOperationOn:withColor:
ImageEditView.st
--- a/ImageEditView.st	Fri Jan 20 23:26:13 2017 +0100
+++ b/ImageEditView.st	Fri Jan 20 23:34:24 2017 +0100
@@ -1593,9 +1593,17 @@
     listOfOpNames := OrderedCollection new.
     listOfOpSelectors := OrderedCollection new. 
     
-    listOfOpNames add:(resources string:'edit separately'). 
-    listOfOpSelectors add:#edit.
-    
+    listOfOpNames addAll:
+        (resources array:#(
+           'edit separately'
+           'extract subimage'
+        )).
+    listOfOpSelectors addAll:
+        #(
+            #edit
+            #editSubImage
+        ).
+
     self readOnly ifFalse:[
         listOfOpNames addAll:
             (resources array:#(
@@ -1650,6 +1658,11 @@
         (self image subImageIn:imageBox) edit.
         ^ false.
     ].
+    operation == #editSubImage ifTrue:[
+        self makeUndo.
+        self image:(self image subImageIn:imageBox).
+        ^ false.
+    ].
     operation == #flipVertical ifTrue:[
         self flipSubImage:#vertical in:imageBox.
         ^ true.