Fix behavior, if a menu item's choice is a block
authorStefan Vogel <sv@exept.de>
Thu, 05 Apr 2012 20:35:07 +0200
changeset 4118 a2a352a255a9
parent 4117 b2eb0d2d0008
child 4119 f5cb7a477fbe
Fix behavior, if a menu item's choice is a block
MenuPanel.st
--- a/MenuPanel.st	Thu Apr 05 17:57:25 2012 +0200
+++ b/MenuPanel.st	Thu Apr 05 20:35:07 2012 +0200
@@ -5873,13 +5873,13 @@
     |arg|
 
     indication notNil ifTrue:[
-	arg := self indicationValue not.
-	self indicationValue:arg.
+        arg := self indicationValue not.
+        self indicationValue:arg.
     ] ifFalse:[
-	choice notNil ifTrue:[
-	    choice value:(menuItem choiceValue).
-	    ^ true
-	]
+        (choice notNil and:[choice isValueModel])ifTrue:[
+            choice value:(menuItem choiceValue).
+            ^ true
+        ].
     ].
     ^ arg
 ! !
@@ -8631,11 +8631,11 @@
 !MenuPanel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.536 2012-03-07 10:30:01 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.537 2012-04-05 18:35:07 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.536 2012-03-07 10:30:01 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.537 2012-04-05 18:35:07 stefan Exp $'
 ! !
 
 MenuPanel initialize!