The Trunk: MorphicExtras-kfr.245.mcz

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

The Trunk: MorphicExtras-kfr.245.mcz

commits-2
Karl Ramberg uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-kfr.245.mcz

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

Name: MorphicExtras-kfr.245
Author: kfr
Time: 9 August 2018, 11:12:32.522421 am
UUID: 3e41fb75-0b24-f74d-b50f-c0c87ab6c9e5
Ancestors: MorphicExtras-kfr.244

PianoRollNoteMorph need to send owner changed to redraw the PianoRollScoreMorph a couple of places

=============== Diff against MorphicExtras-kfr.244 ===============

Item was changed:
  ----- Method: PianoRollNoteMorph>>mouseDown: (in category 'event handling') -----
  mouseDown: evt
 
  hitLoc := evt cursorPoint.
  editMode := nil.
  owner submorphsDo:
  [:m | (m isKindOf: PianoRollNoteMorph) ifTrue: [m deselect]].
  selected := true.
+ self changed.
+ owner changed.
- self changed.
  owner selection: (Array with: trackIndex with: indexInTrack with: indexInTrack).
  self playSound!

Item was changed:
  ----- Method: PianoRollNoteMorph>>selectNotes: (in category 'selecting') -----
  selectNotes: evt
 
  | lastMorph oldEnd saveOwner |
+
  saveOwner := owner.
  (owner autoScrollForX: evt cursorPoint x) ifTrue:
  ["If scroll talkes place I will be deleted and my x-pos will become invalid."
  owner := saveOwner.
  bounds := bounds withLeft: (owner xForTime: self noteInScore time)].
  oldEnd := owner selection last.
  (owner notesInRect: (evt cursorPoint x @ owner top corner: owner bottomRight))
  do: [:m | m trackIndex = trackIndex ifTrue: [m deselect]].
+ self select.  
+ lastMorph := self.
- self select.  lastMorph := self.
  (owner notesInRect: (self left @ owner top corner: evt cursorPoint x @ owner bottom))
  do: [:m | m trackIndex = trackIndex ifTrue: [m select.  lastMorph := m]].
  owner selection: (Array with: trackIndex with: indexInTrack with: lastMorph indexInTrack).
  lastMorph indexInTrack ~= oldEnd ifTrue:
  ["Play last note as selection grows or shrinks"
+ owner ifNotNil: [lastMorph playSound]].
+ owner changed.
- owner ifNotNil: [lastMorph playSound]]
  !