--- a/ImageEditor.st Fri Sep 14 14:30:43 2001 +0200
+++ b/ImageEditor.st Fri Sep 14 18:25:38 2001 +0200
@@ -1796,19 +1796,19 @@
listOfColors := self listOfColors.
image := self image.
].
- imageEditView selectColors: (Array
+ imageEditView drawingColors:(Array
with: (listOfColors at:1)
with: (listOfColors at:2 ifAbsent:[listOfColors at:1])).
image mask notNil ifTrue: [
colorMapMode value:(colorMapMode value, ' + mask').
- (listOfColors detect: [:clr| clr = (Color basicNew setColorId:0)] ifNone: nil) isNil
+ (listOfColors detect: [:clr| clr = (Color colorId:0)] ifNone: nil) isNil
ifTrue:[
- listOfColors addFirst: (Color basicNew setColorId:0).
- imageEditView selectColors: (Array
- with:(listOfColors at:2 ifAbsent:[listOfColors at: 1])
- with: (listOfColors at: 1)).
+ listOfColors addFirst:(Color colorId:0).
+ imageEditView drawingColors: (Array
+ with:(listOfColors at:2 ifAbsent:[listOfColors at:1])
+ with:(listOfColors at:1)).
]
].
self selectionOfColor
@@ -1817,7 +1817,7 @@
!
update:something with:aParameter from:changedObject
- |clrIndex img|
+ |clrIndex img |
img := self image.
changedObject == self listOfColors ifTrue:[
@@ -1859,7 +1859,14 @@
self imagePreView redraw:aParameter.
^ self.
].
-
+ something == #selectedColor ifTrue:[
+ (aParameter = (Color colorId:0)) ifTrue:[
+ self halt.
+ ].
+ clrIndex := self listOfColors indexOf:aParameter.
+ self selectionOfColor value:clrIndex.
+ ^ self.
+ ].
^ self.
].
@@ -2226,15 +2233,12 @@
super open.
imageEditView := (builder componentAt: #imageEditView) subViews first.
- imageEditView masterApplication: self.
-
!
postOpenWith:aBuilder
"after opening, sets the masterApplication of the imageEditView to self;
evaluate the postOpenAction"
- imageEditView masterApplication: self.
imageEditView undoImages addDependent:self.
imageEditView imageInfoHolder:(self imageInfoHolder).
imageEditView activityInfoHolder:(self activityInfoHolder).