The Trunk: Morphic-mt.841.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.841.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.841.mcz

==================== Summary ====================

Name: Morphic-mt.841
Author: mt
Time: 7 April 2015, 4:48:29.949 pm
UUID: 9d290349-e1cd-9341-819f-520e8330bc05
Ancestors: Morphic-mt.840

Fixed preference "menu request updates selection" to honor model's #okToChange.

=============== Diff against Morphic-mt.840 ===============

Item was changed:
  ----- Method: PluggableListMorph>>mouseDown: (in category 'events') -----
  mouseDown: evt
  | selectors row |
  row := self rowAtLocation: evt position.
 
  evt yellowButtonPressed  "First check for option (menu) click"
  ifTrue: [
+ (self class menuRequestUpdatesSelection and: [model okToChange]) ifTrue: [
- self class menuRequestUpdatesSelection ifTrue: [
  "Models depend on the correct selection:"
  self selectionIndex = (self modelIndexFor: row)
  ifFalse: [self changeModelSelection: (self modelIndexFor: row)]].
 
  ^ self yellowButtonActivity: evt shiftPressed].
  row = 0  ifTrue: [^super mouseDown: evt].
  "self dragEnabled ifTrue: [aMorph highlightForMouseDown]."
  selectors := Array
  with: #click:
  with: (doubleClickSelector ifNotNil:[#doubleClick:])
  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>>mouseDown: (in category 'event handling') -----
  mouseDown: evt
  | aMorph selectors |
  aMorph := self itemFromPoint: evt position.
  evt yellowButtonPressed  "First check for option (menu) click"
  ifTrue: [
+ (PluggableListMorph menuRequestUpdatesSelection and: [model okToChange]) ifTrue: [
- PluggableListMorph menuRequestUpdatesSelection ifTrue: [
  aMorph == selectedMorph
  ifFalse: [self setSelectedMorph: aMorph]].
  ^ self yellowButtonActivity: evt shiftPressed].
  (aMorph notNil and:[aMorph inToggleArea: (aMorph point: evt position from: self)])
  ifTrue:[^self toggleExpandedState: aMorph event: evt].
  aMorph ifNil:[^super mouseDown: evt].
  aMorph highlightForMouseDown.
  selectors := Array
  with: #click:
  with: nil
  with: nil
  with: (self dragEnabled ifTrue:[#startDrag:] ifFalse:[nil]).
  evt hand waitForClicksOrDrag: self event: evt selectors: selectors threshold: HandMorph dragThreshold "pixels".!