The Trunk: Morphic-bf.621.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-bf.621.mcz

commits-2
Bert Freudenberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-bf.621.mcz

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

Name: Morphic-bf.621
Author: bf
Time: 19 July 2012, 4:46:28.191 pm
UUID: 35494a91-808a-4bc3-bb8c-0ebc2f0d2b26
Ancestors: Morphic-cmm.620

Fix filtering in AlternatePluggableListMorphOfMany. WTF do we even have subclasses of PluggableListMorph? It's supposed to be pluggable!

=============== Diff against Morphic-cmm.620 ===============

Item was removed:
- (PackageInfo named: 'Morphic') postscriptOfRemoval: 'nil'!

Item was removed:
- (PackageInfo named: 'Morphic') preamble: 'nil'!

Item was changed:
  ----- Method: AlternatePluggableListMorphOfMany>>itemSelectedAmongMultiple: (in category 'model access') -----
  itemSelectedAmongMultiple: index
+ ^self listSelectionAt: (self modelIndexFor: index)!
- ^model isMessageSelectedAt: index!

Item was changed:
  ----- Method: AlternatePluggableListMorphOfMany>>mouseDown: (in category 'event handling') -----
  mouseDown: event
  | row |
 
  event yellowButtonPressed ifTrue: [^ self yellowButtonActivity: event shiftPressed].
 
  row := self rowAtLocation: event position.
 
  row = 0 ifTrue: [^super mouseDown: event].
 
  model okToChange ifFalse: [^ self].  "No change if model is locked"
 
  "Inform model of selected item and let it toggle."
  self
+ changeModelSelection: (self modelIndexFor: row)
- changeModelSelection: row
  shifted: event shiftPressed
  controlled: event controlKeyPressed.
 
 
  "
  event hand releaseMouseFocus: aMorph.
  submorphs do: [ :each | each changed ]
  "!

Item was changed:
  ----- Method: AlternatePluggableListMorphOfMany>>mouseMove: (in category 'event handling') -----
  mouseMove: event
  "The mouse has moved, as characterized by the event provided.  Adjust the scrollbar, and alter the selection as appropriate"
 
  | oldIndex oldVal row |
  event position y < self top
  ifTrue:
  [scrollBar scrollUp: 1.
  row := self rowAtLocation: scroller topLeft + (1 @ 1)]
  ifFalse:
  [row := event position y > self bottom
  ifTrue:
  [scrollBar scrollDown: 1.
  self rowAtLocation: scroller bottomLeft + (1 @ -1)]
  ifFalse: [ self rowAtLocation: event position]].
  row = 0 ifTrue: [^super mouseDown: event].
 
  model okToChange ifFalse: [^self]. "No change if model is locked"
 
  "Set meaning for subsequent dragging of selection"
  oldIndex := self getCurrentSelectionIndex.
  oldIndex ~= 0 ifTrue: [oldVal := self listSelectionAt: oldIndex].
  "Need to restore the old one, due to how model works, and set new one."
  oldIndex ~= 0 ifTrue: [self listSelectionAt: oldIndex put: oldVal].
 
  "Inform model of selected item and let it toggle."
  self
+ changeModelSelection: (self modelIndexFor: row)
- changeModelSelection: row
  shifted: true
  controlled: event controlKeyPressed.
  submorphs do: [:each | each changed]!