# HG changeset patch # User Claus Gittinger # Date 1000484738 -7200 # Node ID 4249a6a1b252fe9f5aec1616c1bc80eb47c64bdf # Parent 08f46b59ef9b3a31111d9bf98bc4e48ab9b73887 pick with SHIFT-click in the mag-view diff -r 08f46b59ef9b -r 4249a6a1b252 ImageEditor.st --- 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).