Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.2114.mcz
==================== Summary ====================
Name: Morphic-mt.2114 Author: mt Time: 20 June 2023, 11:03:40.502968 am UUID: 17032d6e-abaf-fc40-8476-a6659b481ac4 Ancestors: Morphic-mt.2113
In tree widgets, fixes issue where you could not click on the blank area where the expand icon would be if there were children but if there are no children, the user expects selection update.
=============== Diff against Morphic-mt.2113 ===============
Item was changed: ----- Method: SimpleHierarchicalListMorph>>mouseDown: (in category 'event handling') ----- mouseDown: evt
+ | clickedMorph selectors | + clickedMorph := self itemFromPoint: evt position. - | aMorph selectors | - aMorph := self itemFromPoint: evt position. evt yellowButtonPressed "First check for option (menu) click" ifTrue: [ (PluggableListMorph menuRequestUpdatesSelection and: [model okToChange]) ifTrue: [ + clickedMorph == selectedMorph + ifFalse: [self setSelectedMorph: clickedMorph]]. - aMorph == selectedMorph - ifFalse: [self setSelectedMorph: aMorph]]. ^ self yellowButtonActivity: evt shiftPressed].
+ clickedMorph ifNil: [^ super mouseDown: evt]. - aMorph ifNil: [^ super mouseDown: evt].
+ ((clickedMorph inToggleArea: (clickedMorph point: evt position from: self)) + and: [clickedMorph canExpand]) + ifTrue: [ | priorSelection | + priorSelection := self selectedMorph. + (evt shiftPressed and: [clickedMorph canExpand and: [clickedMorph isExpanded not]]) + ifTrue: [self expandAllSafely: clickedMorph] + ifFalse: [self toggleExpandedState: clickedMorph event: evt]. + (priorSelection notNil and: [self selectedMorph isNil]) ifTrue: [ + self setProperty: #changeSelectionOnMouseUp toValue: true. + self setProperty: #selectedMorph toValue: clickedMorph]. + ^ self]. - (aMorph notNil and:[aMorph inToggleArea: (aMorph point: evt position from: self)]) - ifTrue: [ | priorSelection | - priorSelection := self selectedMorph. - (evt shiftPressed and: [aMorph canExpand and: [aMorph isExpanded not]]) - ifTrue: [self expandAllSafely: aMorph] - ifFalse: [self toggleExpandedState: aMorph event: evt]. - (priorSelection notNil and: [self selectedMorph isNil]) ifTrue: [ - self setProperty: #changeSelectionOnMouseUp toValue: true. - self setProperty: #selectedMorph toValue: aMorph]. - ^ self]. PluggableListMorph highlightPreSelection ifTrue: [ + clickedMorph highlightedForMouseDown: true. + self setProperty: #highlightedMorph toValue: clickedMorph]. - aMorph highlightedForMouseDown: true. - self setProperty: #highlightedMorph toValue: aMorph]. self setProperty: #changeSelectionOnMouseUp toValue: true. selectors := Array with: #click: with: (self doubleClickEnabled ifTrue: [#doubleClick:] ifFalse: [nil]) with: nil with: (self dragEnabled ifTrue:[#startDrag:] ifFalse:[nil]). evt hand waitForClicksOrDrag: self event: evt selectors: selectors threshold: HandMorph dragThreshold "pixels".!
packages@lists.squeakfoundation.org