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

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

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

Name: Morphic-mt.1712
Author: mt
Time: 4 November 2020, 4:45:33.94762 pm
UUID: 532fbef4-796e-f342-9302-d1c0731146b7
Ancestors: Morphic-mt.1711

Fixes dropping for non-world paste-up morphs.

=============== Diff against Morphic-mt.1711 ===============

Item was changed:
  ----- Method: PasteUpMorph>>morphToDropFrom: (in category 'dropping/grabbing') -----
  morphToDropFrom: aMorph
  "Given a morph being carried by the hand which the hand is about to drop, answer the actual morph to be deposited.  Normally this would be just the morph itself, but several unusual cases arise, which this method is designed to service."
 
  | aNail representee handy posBlock |
+ handy := self isWorldMorph
+ ifTrue: [self primaryHand]
+ ifFalse: [self currentHand].
- handy := self primaryHand.
  posBlock :=
  [:z | | tempPos |
  tempPos := handy position
  - ((handy targetOffset - aMorph formerPosition)
  * (z extent / aMorph extent)) rounded.
  self pointFromWorld: tempPos].
  self alwaysShowThumbnail
  ifTrue:
  [aNail := aMorph
  representativeNoTallerThan: self maxHeightToAvoidThumbnailing
  norWiderThan: self maximumThumbnailWidth
  thumbnailHeight: self heightForThumbnails.
  aNail == aMorph
  ifFalse:
  [aMorph formerPosition: aMorph position.
  aNail position: (posBlock value: aNail)].
  ^aNail].
  ((aMorph isKindOf: MorphThumbnail)
  and: [(representee := aMorph morphRepresented) owner isNil])
  ifTrue:
  [representee position: (posBlock value: representee).
  ^representee].
  self showingListView
  ifTrue:
  [^aMorph
  listViewLineForFieldList: (self valueOfProperty: #fieldListSelectors)].
  (aMorph hasProperty: #newPermanentScript)
  ifTrue: [^aMorph asEmptyPermanentScriptor].
  ((aMorph isPhraseTileMorph) or: [aMorph isSyntaxMorph])
  ifFalse: [^aMorph morphToDropInPasteUp: self].
  aMorph userScriptSelector isEmptyOrNil
  ifTrue:
  ["non-user"
 
  self automaticPhraseExpansion ifFalse: [^aMorph]].
  ^aMorph morphToDropInPasteUp: self!