'From Squeak3.7alpha of 11 September 2003 [latest update: #5816] on 13 March 2004 at 6:46:06 pm'! "Change Set: DeselectGrabbedMenuItems-spfa Date: 13 March 2004 Author: Stephane Rollandin When we open a menu and grab or duplicate one of its item via the halo, we get an highlighted item in the hand and there is no easy way to deselect it without triggering its action. This changeset modifies two methods of MenuItemMorph so that a menu item grabbed or duplicated gets deselected. "! !MenuItemMorph methodsFor: 'grabbing' stamp: 'spfa 3/13/2004 18:34'! aboutToBeGrabbedBy: aHand "Don't allow the receiver to act outside a Menu" | menu box | (owner notNil and:[owner submorphs size = 1]) ifTrue:[ "I am a lonely menuitem already; just grab my owner" owner stayUp: true. ^owner aboutToBeGrabbedBy: aHand]. box _ self bounds. menu _ MenuMorph new defaultTarget: nil. menu addMorphFront: self. menu bounds: box. menu stayUp: true. self isSelected: false. ^menu! ! !MenuItemMorph methodsFor: 'grabbing' stamp: 'spfa 3/13/2004 18:32'! duplicateMorph: evt "Make and return a duplicate of the receiver's argument" | dup menu | dup _ self duplicate isSelected: false. menu _ MenuMorph new defaultTarget: nil. menu addMorphFront: dup. menu bounds: self bounds. menu stayUp: true. evt hand grabMorph: menu from: owner. "duplicate was ownerless so use #grabMorph:from: here" ^menu! !