--- a/ImageEditor.st Wed Jul 26 13:59:33 2000 +0200
+++ b/ImageEditor.st Wed Jul 26 14:14:21 2000 +0200
@@ -2595,7 +2595,7 @@
doCropManual
"let user specify borders and cut them off"
- |bindings left top right bottom|
+ |bindings left top right bottom img|
bindings := IdentityDictionary new.
bindings at:#left put:(left := 0 asValue).
@@ -2608,10 +2608,11 @@
right := right value.
top := top value.
bottom := bottom value.
+ img := imageEditView image.
imageEditView
makeSubImageX:left y:top
- width:(imageEditView image width - left - right)
- height:(imageEditView image height - top - bottom).
+ width:(img width - left - right)
+ height:(img height - top - bottom).
self updateInfoLabel
].
@@ -2807,7 +2808,8 @@
doNewImage
"opens a dialog with choices of size and color map for creating a new image"
- |aspects|
+ |aspects width height cMap imageClass image szString|
+
aspects := IdentityDictionary new
at:#listOfSizes put: self class listOfDefaultSizes asValue;
@@ -2817,12 +2819,10 @@
yourself.
(self openDialogInterface:#dialogSpecForNewImage withBindings:aspects)
- ifTrue:
- [
- |width height cMap imageClass image|
-
- width := 128 min: (Integer readFromString: ((aspects at:#selectionOfSize) value upTo: $x) onError:[24]).
- height := 128 min: (Integer readFromString: ((aspects at:#selectionOfSize) value copy reverse upTo: $x) reverse onError:[24]).
+ ifTrue:[
+ szString := (aspects at:#selectionOfSize) value.
+ width := 128 min: (Integer readFromString: (szString upTo: $x) onError:[24]).
+ height := 128 min: (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[24]).
cMap := (self class listOfColorMaps at: (colorMapMode value: (aspects at:#selectionOfColorMap) value) value).
imageClass := Image implementorForDepth: ((cMap size log: 2) asInteger).
@@ -2885,7 +2885,7 @@
nextImageInSequence
"display the next image in the image sequence"
- |img seq frame|
+ |img seq frame listOfColors|
imageEditView releaseUndos.
@@ -2902,10 +2902,11 @@
imageEditView image:(frame image).
(img := self image) notNil ifTrue:[
+ listOfColors := self listOfColors.
img colorMap notNil ifTrue:[
- self listOfColors contents:(img usedColors asSet asOrderedCollection).
+ listOfColors contents:(img usedColors asSet asOrderedCollection).
] ifFalse:[
- self listOfColors removeAll.
+ listOfColors removeAll.
].
self findColorMapMode.
self updateLabelsAndHistory.