changed #doAskAndReplaceWidgetBy
authorca
Fri, 08 Aug 2008 16:43:46 +0200
changeset 2397 07ab2bdac066
parent 2396 042e31fded4f
child 2398 bdefc2be920a
changed #doAskAndReplaceWidgetBy
UIPainter.st
--- a/UIPainter.st	Fri Aug 08 16:43:31 2008 +0200
+++ b/UIPainter.st	Fri Aug 08 16:43:46 2008 +0200
@@ -4432,13 +4432,16 @@
 !
 
 doAskAndReplaceWidgetBy
-    |widgetClass list common|
+    |widgetClass list common selectedSpec|
+
+    selectedSpec := self selectedSpec.
+    selectedSpec isNil ifTrue:[^ self].
 
     list :=  UISpecification allSubclasses
                 select:[:cls | Error handle:[ false ] do:[ cls viewClass notNil]].
     list sort:[:a :b | a name < b name].
 
-    common := self selectedSpec class commonReplacementClasses.
+    common := selectedSpec class commonReplacementClasses.
     common notEmpty ifTrue:[
         list addAllFirst:(common , (Array with:'-')).
     ].