ColorMenu.st
changeset 3708 de8fd46e5363
parent 3707 380dcd111024
child 3709 d8f3b30013c0
--- a/ColorMenu.st	Thu May 28 08:37:26 2009 +0200
+++ b/ColorMenu.st	Thu May 28 12:48:00 2009 +0200
@@ -362,26 +362,28 @@
             color := item argument.
             holder label:(Text string:'   ' emphasis:(#backgroundColor->color)).
         ].
-        self choseColor:color.
+        self chooseColor:color.
     ]
 !
 
-choseColor:aColor
+chooseColor:aColor
     "accept the current selected item"
 
+    color := aColor.
+
     (model notNil 
     and:[ model isSymbol not]) ifTrue:[
         model value:aColor.
-        aColor notNil ifTrue:[
-            RecentlyUsedColors isNil ifTrue:[
-                RecentlyUsedColors := OrderedCollection new.
-            ].
-            RecentlyUsedColors remove:aColor ifAbsent:[].
-            RecentlyUsedColors addFirst:aColor.
-            RecentlyUsedColors size > 20 ifTrue:[
-                RecentlyUsedColors removeLast
-            ].
-        ]
+    ].
+    aColor notNil ifTrue:[
+        RecentlyUsedColors isNil ifTrue:[
+            RecentlyUsedColors := OrderedCollection new.
+        ].
+        RecentlyUsedColors remove:aColor ifAbsent:[].
+        RecentlyUsedColors addFirst:aColor.
+        RecentlyUsedColors size > 20 ifTrue:[
+            RecentlyUsedColors removeLast
+        ].
     ]
 ! !
 
@@ -430,7 +432,7 @@
         self disabledRedrawDo:[
             enabledChannel value:true.
             self colorHolder label:label.
-            self choseColor:aColor
+            self chooseColor:aColor
         ]
     ]
 !
@@ -652,5 +654,5 @@
 !ColorMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ColorMenu.st,v 1.59 2009-05-28 06:37:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ColorMenu.st,v 1.60 2009-05-28 10:48:00 cg Exp $'
 ! !