'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 23 September 2004 at 3:37:04 pm'! "Change Set: EmptySelectionFix-st Date: 23 September 2004 Author: Samuel Tardieu Without this fix, menu commands such as 'Align left edges' fail if the selection contains zero items."! !SelectionMorph methodsFor: 'halo commands' stamp: 'st 9/23/2004 15:34'! alignBottomEdges "Make the bottom coordinate of all my elements be the same" | maxBottom | selectedItems ifEmpty: [^ self]. maxBottom := (selectedItems collect: [:itm | itm bottom]) max. selectedItems do: [:itm | itm bottom: maxBottom]! ! !SelectionMorph methodsFor: 'halo commands' stamp: 'st 9/23/2004 15:34'! alignLeftEdges "Make the left coordinate of all my elements be the same" | minLeft | selectedItems ifEmpty: [^ self]. minLeft := (selectedItems collect: [:itm | itm left]) min. selectedItems do: [:itm | itm left: minLeft]! ! !SelectionMorph methodsFor: 'halo commands' stamp: 'st 9/23/2004 15:34'! alignRightEdges "Make the right coordinate of all my elements be the same" | maxRight | selectedItems ifEmpty: [^ self]. maxRight := (selectedItems collect: [:itm | itm right]) max. selectedItems do: [:itm | itm right: maxRight]! ! !SelectionMorph methodsFor: 'halo commands' stamp: 'st 9/23/2004 15:34'! alignTopEdges "Make the top coordinate of all my elements be the same" | minTop | selectedItems ifEmpty: [^ self]. minTop := (selectedItems collect: [:itm | itm top]) min. selectedItems do: [:itm | itm top: minTop]! !