# HG changeset patch # User ca # Date 1033190133 -7200 # Node ID cb3e093aa6d5eac53fa6ca3fc40e28633387ab1f # Parent 3ebd61486dc92e3329845137c77f211e2ad00f6d if after collapse no selection exists, use the collapsed element diff -r 3ebd61486dc9 -r cb3e093aa6d5 MenuEditor.st --- a/MenuEditor.st Wed Sep 25 09:28:50 2002 +0200 +++ b/MenuEditor.st Sat Sep 28 07:15:33 2002 +0200 @@ -1324,7 +1324,12 @@ |item| item := listOfItems at:atLine ifAbsent:nil. - item ifNotNil:[ item toggleExpand ]. + item ifNotNil:[ + item toggleExpand. + self hasSelection ifFalse:[ + self selectedItem:item + ] + ]. ! ! !MenuEditor methodsFor:'aspects'! @@ -1871,6 +1876,12 @@ ^ self askForItemModification ! +hasSelection + "returns true if a selection exists + " + ^ selectionHolder value size ~~ 0 +! + selectedItem "returns the selected item or nil (none or multiple selected) "