[squeak-dev] The Trunk: Morphic-mt.2082.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Jan 30 18:59:08 UTC 2023


Thank you!

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Montag, 30. Januar 2023 10:47:15
An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
Betreff: [squeak-dev] The Trunk: Morphic-mt.2082.mcz

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.!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230130/a13da8a6/attachment-0001.html>


More information about the Squeak-dev mailing list