The Trunk: Morphic-mt.1595.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.1595.mcz

Marcel Taeumel uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-mt.1595
Author: mt
Time: 26 November 2019, 5:30:59.627764 pm
UUID: b706474f-6b3b-b949-a8c4-dab4da0cc2f3
Ancestors: Morphic-mt.1594

Fixes internal drag-drop-move in pluggable lists. Thanks to Jakob (jr)!

=============== Diff against Morphic-mt.1594 ===============

Item was changed:
+ ----- Method: PluggableListMorph>>mouseLeaveDragging: (in category 'events') -----
- ----- Method: PluggableListMorph>>mouseLeaveDragging: (in category 'event handling') -----
  mouseLeaveDragging: anEvent
  self hoverRow: nil.
+ anEvent hand releaseMouseFocus: self.
  (self dropEnabled and:[anEvent hand hasSubmorphs]) ifFalse: ["no d&d"
  ^ super mouseLeaveDragging: anEvent].
  self resetPotentialDropRow.
- anEvent hand releaseMouseFocus: self.
  "above is ugly but necessary for now"

Item was changed:
  ----- Method: PluggableListMorph>>startDrag: (in category 'drag and drop') -----
  startDrag: evt
  | item itemMorph |
  evt hand hasSubmorphs ifTrue: [^ self].
  self model okToChange ifFalse: [^ self].
  "Ensure selection to save additional click."
  (self rowAtLocation: evt position) in: [:clickedRow |
  self selectionIndex = clickedRow
  ifFalse: [self changeModelSelection: (self modelIndexFor: clickedRow)]].
  item := self selection ifNil: [^ self].
  itemMorph := StringMorph contents: item asStringOrText.
  [ "Initiate drag."
  (self model dragPassengerFor: itemMorph inMorph: self) ifNotNil: [:passenger | | ddm |
  ddm := (self valueOfProperty: #dragTransferClass ifAbsent: [TransferMorph]) withPassenger: passenger from: self.
  ddm dragTransferType: (self model dragTransferTypeForMorph: self).
  ddm updateFromUserInputEvent: evt.
  self model dragStartedFor: itemMorph transferMorph: ddm.
+ evt hand grabMorph: ddm.
+ self mouseEnterDragging: evt "Enable internal move"]
+ ] ensure: [Cursor normal show].!
- evt hand grabMorph: ddm]
- ] ensure: [
- Cursor normal show.
- evt hand releaseMouseFocus: self].!