[squeak-dev] The Trunk: Morphic-mt.2082.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jan 30 09:47:15 UTC 2023
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2082.mcz
==================== Summary ====================
Name: Morphic-mt.2082
Author: mt
Time: 30 January 2023, 10:47:12.840518 am
UUID: 6d4a75d3-9931-2b42-bb00-b3ec6b5942e2
Ancestors: Morphic-mt.2081
In tree widgets, fixes regression that mouse-clicks on toggle nodes should not update the current selection but only expand/collapse that node.
=============== Diff against Morphic-mt.2081 ===============
Item was changed:
----- Method: SimpleHierarchicalListMorph>>mouseDown: (in category 'event handling') -----
mouseDown: evt
+
+ | aMorph selectors |
- | aMorph selectors |
-
aMorph := self itemFromPoint: evt position.
evt yellowButtonPressed "First check for option (menu) click"
ifTrue: [
(PluggableListMorph menuRequestUpdatesSelection and: [model okToChange]) ifTrue: [
aMorph == selectedMorph
ifFalse: [self setSelectedMorph: aMorph]].
^ self yellowButtonActivity: evt shiftPressed].
+
+ aMorph ifNil: [^ super mouseDown: evt].
+
(aMorph notNil and:[aMorph inToggleArea: (aMorph point: evt position from: self)])
+ ifTrue: [^ self toggleExpandedState: aMorph event: evt].
- ifTrue:[^self toggleExpandedState: aMorph event: evt].
- aMorph ifNil:[^super mouseDown: evt].
PluggableListMorph highlightPreSelection ifTrue: [
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".!
Item was changed:
----- Method: SimpleHierarchicalListMorph>>mouseUp: (in category 'event handling') -----
mouseUp: event
| clickedMorph |
model okToChange ifFalse: [^ self].
(clickedMorph := self itemFromPoint: event position) ifNil: [^ self].
(self valueOfProperty: #highlightedMorph ifAbsent: [])
ifNotNil: [:m |
m highlightedForMouseDown: false.
self removeProperty: #highlightedMorph].
+ (self hasProperty: #changeSelectionOnMouseUp)
+ ifFalse: [^ self]
+ ifTrue: [self removeProperty: #changeSelectionOnMouseUp].
+
((autoDeselect isNil or: [autoDeselect]) and: [clickedMorph == selectedMorph])
ifTrue: [self setSelectedMorph: nil]
ifFalse: [self setSelectedMorph: clickedMorph].
event hand newKeyboardFocus: self.
Cursor normal show.!
More information about the Squeak-dev
mailing list
|