MenuPanel.st
changeset 2934 b4ec1cbb3302
parent 2926 0d6dc899b49f
child 2936 723062b99960
--- a/MenuPanel.st	Mon Mar 06 09:56:11 2006 +0100
+++ b/MenuPanel.st	Mon Mar 06 09:58:33 2006 +0100
@@ -984,18 +984,21 @@
     topMenu openDelayed:nil.
 
     (anItem isNil or:[anItem hideMenuOnActivated]) ifTrue:[
-	topMenu accept:anItem
+        topMenu accept:anItem
     ] ifFalse:[
-	anItem canAccept ifTrue:[
-	    tgState := anItem toggleIndication.
-
-	    self accept:anItem
-		  index:(aMenu selectionIndex)
-		 toggle:tgState 
-	       receiver:(aMenu receiver).
-
-	    aMenu do:[:el| el updateIndicators].
-	]
+        anItem canAccept ifTrue:[
+            tgState := anItem toggleIndication.
+
+            self accept:anItem
+                  index:(aMenu selectionIndex)
+                 toggle:tgState 
+               receiver:(aMenu receiver).
+
+            aMenu do:[:el| el updateIndicators].
+            anItem hideMenuOnActivated ifFalse:[
+                aMenu invalidate
+            ].
+        ]
     ]
 !
 
@@ -6175,11 +6178,15 @@
 updateIndicators
     "update indicators "
 
-    (indication notNil and:[indication isSymbol]) ifTrue:[
-        " indication is a selector otherwise a change notification
-          is raised from the model !!!!
-        "
-        self update:nil with:nil from:indication
+    indication notNil ifTrue:[
+        (indication isSymbol 
+        or:[menuItem hideMenuOnActivated not])
+        ifTrue:[
+            "indication is a selector;
+             otherwise no need to redraw, because
+             a change notification is raised from the model !!!!"
+            self update:nil with:nil from:indication
+        ]
     ]
 ! !
 
@@ -7634,7 +7641,7 @@
 !MenuPanel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.424 2006-02-23 21:14:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.425 2006-03-06 08:58:33 cg Exp $'
 ! !
 
 MenuPanel initialize!