--- a/ImageEditor.st Thu Mar 01 10:52:33 2012 +0100
+++ b/ImageEditor.st Sun Mar 18 14:43:52 2012 +0100
@@ -6176,21 +6176,29 @@
doRotateImage
"rotates current image"
- |box rotation|
-
- box := EnterBox new.
- box title:(resources string:'Rotate by (degrees, clockwise):').
- box okText:(resources string:'OK').
- box abortText:(resources string:'Cancel').
- box initialText: '0'.
- box showAtPointer.
- (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil])
- ifTrue:[
- imageEditView rotateImageBy:rotation.
- self updateInfoLabel.
- ].
-
- "Modified: / 11-11-2007 / 13:21:11 / cg"
+ |rotationString box rotation|
+
+ rotationString := Dialog
+ request:(resources string:'Rotate by (degrees, clockwise):')
+ list:#( '-90' '90' '180' '45' '-45' '135' '-135' )
+ initialAnswer:90.
+ rotationString isEmptyOrNil ifTrue:[^ self]. "/ cancelled
+ rotation := Number readFrom:rotationString onError:[nil].
+ rotation isNil ifTrue:[^ self].
+
+"/ box := EnterBox new.
+"/ box title:(resources string:'Rotate by (degrees, clockwise):').
+"/ box okText:(resources string:'OK').
+"/ box abortText:(resources string:'Cancel').
+"/ box initialText: '0'.
+"/ box showAtPointer.
+"/ (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil])
+"/ ifFalse:[ ^ self ].
+
+ imageEditView rotateImageBy:rotation.
+ self updateInfoLabel.
+
+ "Modified: / 18-03-2012 / 14:41:14 / cg"
!
doShiftManual