ImageEditor.st
changeset 1075 74795d3e647d
parent 1057 36f9d47e1249
child 1076 4391fcd36dcf
equal deleted inserted replaced
1074:49ef9991d1d5 1075:74795d3e647d
  1907 
  1907 
  1908     selectedColorIndex := anIndex.
  1908     selectedColorIndex := anIndex.
  1909     clr := self listOfColors at:anIndex ifAbsent:nil.
  1909     clr := self listOfColors at:anIndex ifAbsent:nil.
  1910     clr isNil ifTrue:[^ self].
  1910     clr isNil ifTrue:[^ self].
  1911 
  1911 
       
  1912     pixel := anIndex - 1.
  1912     (self listOfColors at:1) = Color noColor ifTrue:[
  1913     (self listOfColors at:1) = Color noColor ifTrue:[
  1913         anIndex == 1 ifTrue:[
  1914         anIndex == 1 ifTrue:[
  1914             pixel := nil.       "/ mask
  1915             pixel := nil.       "/ mask
  1915         ] ifFalse:[
  1916         ] ifFalse:[
  1916             pixel := anIndex - 2
  1917             pixel := pixel - 1
  1917         ]
  1918         ]
  1918     ] ifFalse:[
       
  1919         pixel := anIndex - 1
       
  1920     ].
  1919     ].
  1921     imageEditView selectedColorIndex:pixel.
  1920     imageEditView selectedColorIndex:pixel.
  1922     imageEditView selectedColor:clr.
  1921     imageEditView selectedColor:clr.
  1923 
  1922 
  1924 ! !
  1923 ! !