MenuPanel.st
changeset 5239 d6741794b7a6
parent 5193 a3a380b5f148
child 5241 599ff1102334
child 5246 3f2b38bf17ba
--- a/MenuPanel.st	Mon Sep 12 15:02:30 2016 +0200
+++ b/MenuPanel.st	Mon Sep 12 19:39:26 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1997 by eXept Software AG
 	      All Rights Reserved
@@ -874,22 +876,18 @@
 "
     |deviceImages image colorMap|
 
-    LigthenedImages isNil ifTrue:[ LigthenedImages := WeakIdentityDictionary new ].
-
-    (deviceImages := LigthenedImages at:aDevice ifAbsent:nil) isNil ifTrue:[
-	LigthenedImages at:aDevice put:(deviceImages := Dictionary new)
-    ].
-
+    LigthenedImages isNil ifTrue:[LigthenedImages := WeakIdentityDictionary new].
+
+    deviceImages := LigthenedImages at:aDevice ifAbsentPut:[WeakIdentityDictionary new].
     (image := deviceImages at:anImage ifAbsent:nil) notNil ifTrue:[
-	^ image
+        ^ image
     ].
 
     colorMap := anImage perform:#colorMap ifNotUnderstood:nil.
-
     colorMap notNil ifTrue:[
-	image := anImage lightened onDevice:aDevice.
+        image := anImage lightened onDevice:aDevice.
     ] ifFalse:[
-	image := self image:anImage onDevice:aDevice
+        image := self image:anImage onDevice:aDevice
     ].
     deviceImages at:anImage put:image.
     ^ image