#FEATURE by cg
class: ImageEditView
changed: #performSpecialOperationOn:withColor:
--- 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.