checkin from browser
authorClaus Gittinger <cg@exept.de>
Mon, 15 Mar 1999 14:53:15 +0100
changeset 1255 f18c03dc613f
parent 1254 38b8bcfabbd7
child 1256 c4e0b9024475
checkin from browser
MenuPanel.st
--- a/MenuPanel.st	Mon Mar 15 11:57:59 1999 +0100
+++ b/MenuPanel.st	Mon Mar 15 14:53:15 1999 +0100
@@ -2175,12 +2175,14 @@
     menu := self superMenuAtX:x y:y.
 
     menu isNil ifTrue:[
-	menu := self topMenu.
+        menu := self topMenu.
     ] ifFalse:[
-	point := self translatePoint:(x@y) to:menu.
-	item  := menu itemAtX:(point x) y:(point y)
-    ].
-    menu selection:item
+        point := self translatePoint:(x@y) to:menu.
+        item  := menu itemAtX:(point x) y:(point y)
+    ].
+    menu selection:item.
+
+    self requestFocus
 !
 
 buttonRelease:button x:x y:y
@@ -2332,7 +2334,9 @@
     menu := self.
 
     [ menu shown ] whileFalse:[
-        (menu := superMenu) isNil ifTrue:[^ self]
+        (menu := superMenu) isNil ifTrue:[
+            ^ self
+        ]
     ].
 
     key == #Return ifTrue:[
@@ -2534,11 +2538,11 @@
                 sensor flushKeyboardFor:nil
             ].
             device grabKeyboardInView:self.
-
-            superMenu notNil ifTrue:[
-                self requestFocus.
-                self getKeyboardFocus
-            ]
+        ].
+
+        superMenu notNil ifTrue:[
+            self requestFocus.
+            self getKeyboardFocus
         ]
     ]
 
@@ -5399,6 +5403,6 @@
 !MenuPanel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.147 1999-03-15 10:57:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.148 1999-03-15 13:53:15 cg Exp $'
 ! !
 MenuPanel initialize!