changed #drawToggleImage - take care of non-existing images
authorStefan Vogel <sv@exept.de>
Mon, 13 Oct 2008 09:18:21 +0200
changeset 3723 c6331b93035d
parent 3722 c156e76104a8
child 3724 5db1580f82ba
changed #drawToggleImage - take care of non-existing images
RadioButton.st
--- a/RadioButton.st	Mon Oct 13 09:17:27 2008 +0200
+++ b/RadioButton.st	Mon Oct 13 09:18:21 2008 +0200
@@ -723,9 +723,11 @@
     y := (height - imgTop height) // 2.
 
     threeD ifFalse:[
-        self paint:fgColor.
-        self displayForm:imgTop x:x y:y.
-        isActive ifTrue:[
+        imgTop notNil ifTrue:[
+            self paint:fgColor.
+            self displayForm:imgTop x:x y:y.
+        ].
+        (isActive and:[imgOn notNil]) ifTrue:[
             self paint:(lampColor ? activeFgColor).
             self displayForm:imgOn x:x y:y
         ]
@@ -884,5 +886,5 @@
 !RadioButton class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.42 2008-08-12 21:01:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.43 2008-10-13 07:18:21 stefan Exp $'
 ! !