UIPainter.st
changeset 2223 7cddff46d0ad
parent 2222 23205ddb56e1
child 2225 b01b58d85458
--- a/UIPainter.st	Tue Jan 08 12:51:44 2008 +0100
+++ b/UIPainter.st	Tue Jan 08 15:35:12 2008 +0100
@@ -4725,16 +4725,16 @@
     fullSpec fromBuilder:(self canvas)
               components:(SpecCollection new collection:aSpecArray).
 
-    "/ kludge: if grid was on, its now present in the windowSpec (which should not)
-    self canvas gridShown ifTrue:[
-        fullSpec window backgroundColor:nil.    
-    ].
-
-    windowSpec notNil ifTrue:[
-        winSpec := fullSpec window.
+    winSpec := fullSpec window.
+    windowSpec isNil ifTrue:[
+        "/ kludge: if grid was on, its now present in the windowSpec (which should not)
+        self canvas gridShown ifTrue:[
+            fullSpec window backgroundColor:nil.    
+        ].
+    ] ifFalse:[
         winSpec copyValuesFromSpec:windowSpec.
-        winSpec name: winSpec label.
     ].    
+    winSpec name: winSpec label.
     ^ fullSpec literalArrayEncoding.
 !