<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr"><div>BTW: Custom inspector fields helped a lot in finding these issues.</div>
<img id="95950824-bdc8-4f2b-ae2f-3a9f2d29f62c" src="cid:f0d45c00-cb27-4c27-b8a9-fe47b6595ea0" width="584" height="423"></img><br><div class="mb_sig"></div>
<div><br></div><div>Best,</div><div>Marcel</div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 07.10.2021 15:17:18 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Marcel Taeumel uploaded a new version of Morphic to project The Trunk:<br>http://source.squeak.org/trunk/Morphic-mt.1783.mcz<br><br>==================== Summary ====================<br><br>Name: Morphic-mt.1783<br>Author: mt<br>Time: 7 October 2021, 3:16:58.720277 pm<br>UUID: ccc05305-cb74-6841-8a74-ed5a772f7b4b<br>Ancestors: Morphic-mt.1782<br><br>Revises Morphic-mt.1781. Only be a renderer if you have a single submorph. Now you can open a halo on the items in a tree morph again.<br><br>Also fixes meta-click+drag bug on morphs that have a flex-shell.<br><br>Also fixes change-hierarchy bug on morphs that have a flex-shell.<br><br>=============== Diff against Morphic-mt.1782 ===============<br><br>Item was changed:<br> ----- Method: MorphicHaloDispatcher>>dispatchHalo:createFor: (in category 'dispatching') -----<br> dispatchHalo: anEvent createFor: aContainer<br> "Invoke a halo on any aContainer's submorph that wants it. Dispatch uses anEvent's #position. The dispatch only ends in that container if no other morph wants it. Note that the event's #shiftPressed state determines whether the dispatch goes innermost-to-outermost (if pressed) or the other way around (if not pressed).<br> <br> If there already is a halo, check whether the event still points into the same hierarchy. If it does, do nothing here but rely on the halo itself to process the event (see implementors of #transferHalo:from:). If, however, the event points to a different hierarchy in the container, invoke a new halo and discard the current one. We do this here because the current halo should not bother with its container but only its #target."<br> <br> | stack innermost haloTarget |<br> "The stack is the frontmost (i.e. innermost) to backmost (i.e. outermost) morph."<br> stack := (aContainer morphsAt: anEvent position unlocked: true) select:<br>+ [ : each | each wantsHaloFromClick or: [ each isRenderer ] ].<br>- [ : each | each wantsHaloFromClick ].<br> "self assert: [ stack last == aContainer ]."<br> innermost := anEvent hand halo<br> ifNil: [ stack first ]<br> ifNotNil:<br> [ : existingHalo |<br> "self assert: [ existingHalo wantsHaloFromClick not ]. "<br> stack<br> detect: [ : each | each owner == aContainer ]<br> ifFound:<br> [ : topInContainer | "Is existingHalo's target part of the same topInContainer as the morph clicked?"<br> (existingHalo target withAllOwners includes: topInContainer)<br> ifTrue: [ "same hierarchy, let #transferHalo: continue to handle it for now." ^ false ]<br> ifFalse:<br> [ "different hierarchy, remove + add."<br> anEvent hand removeHalo.<br> anEvent shiftPressed<br> ifTrue: [ stack first ]<br> ifFalse: [ topInContainer ] ] ]<br> ifNone: [ "existingHalo is on the World, defer to #transferHalo: for now." ^ false ] ].<br> <br> "If modifier key is pressed, start at innermost (the target), otherwise the outermost (direct child of the world (self))."<br> haloTarget := (innermost == aContainer or: [ anEvent shiftPressed ])<br> ifTrue: [ innermost ]<br> ifFalse:<br> [ "Find the outermost owner that wants it. Ignore containment above aContainer."<br> stack := innermost withAllOwners.<br> (stack first: (stack findFirst: [ : each | each owner == aContainer ])) reversed<br>+ detect: [ : each | each wantsHaloFromClick or: [ each isRenderer ] ]<br>- detect: [ : each | each wantsHaloFromClick ]<br> ifNone: [ "haloTarget has its own mouseDown handler, don't halo." ^ false ] ].<br> "Now that we have the haloTarget, show the halo."<br> self invokeHaloOrMove: anEvent on: haloTarget.<br> ^ true!<br><br>Item was changed:<br> ----- Method: MorphicHaloDispatcher>>invokeHaloOrMove:on: (in category 'invoking') -----<br> invokeHaloOrMove: anEvent on: aMorph<br> "Special gestures (cmd-mouse on the Macintosh; Alt-mouse on Windows and Unix) allow a mouse-sensitive morph to be moved or bring up a halo for the morph."<br>+ | h doNotDrag |<br>- | h tfm doNotDrag |<br> anEvent hand newMouseFocus: aMorph event: anEvent.<br> h := anEvent hand halo.<br> "Prevent wrap around halo transfers originating from throwing the event back in"<br> doNotDrag := false.<br> h ifNotNil:[<br> (h innerTarget == aMorph) ifTrue:[doNotDrag := true].<br> (h innerTarget hasOwner: aMorph) ifTrue:[doNotDrag := true].<br> (aMorph hasOwner: h target) ifTrue:[doNotDrag := true]].<br> <br>+ h := aMorph addHalo: anEvent.<br>- tfm := (aMorph transformedFrom: nil) inverseTransformation.<br>- <br>- "cmd-drag on flexed morphs works better this way"<br>- h := aMorph addHalo: (anEvent transformedBy: tfm).<br> h setProperty: #lastHaloDispatcher toValue: self.<br> doNotDrag ifTrue:[^ true].<br> "Initiate drag transition if requested"<br> anEvent hand <br> waitForClicksOrDrag: h<br>+ event: anEvent<br>- event: (anEvent transformedBy: tfm)<br> selectors: { nil. nil. nil. #startDragTarget:. }<br> threshold: HandMorph dragThreshold.<br> "Pass focus explicitly here"<br> anEvent hand newMouseFocus: h.<br> "Reset temporary cursors to make available halo interaction visible."<br> anEvent hand showTemporaryCursor: nil.<br> ^ true!<br><br>Item was changed:<br> ----- Method: TransformMorph>>isRenderer (in category 'classification') -----<br> isRenderer<br> <br>+ ^ submorphs size = 1<br>- ^ true<br> !<br><br>Item was changed:<br> ----- Method: TransformMorph>>morphicLayerNumber (in category 'submorphs - layers') -----<br> morphicLayerNumber<br> <br>+ ^ self isRenderer<br>+ ifTrue: [self renderedMorph morphicLayerNumber]<br>- ^ self hasSubmorphs<br> ifFalse: [super morphicLayerNumber]<br>+ !<br>- ifTrue: [self firstSubmorph morphicLayerNumber]!<br><br>Item was changed:<br> ----- Method: TransformMorph>>renderedMorph (in category 'classification') -----<br> renderedMorph<br> "We are a renderer. Answer appropriately."<br> <br>+ ^ self isRenderer<br>- ^ self hasSubmorphs<br> ifTrue: [self firstSubmorph renderedMorph]<br>+ ifFalse: [super renderedMorph]!<br>- ifFalse: [self]!<br><br>Item was changed:<br> ----- Method: TransformMorph>>wantsHaloFromClick (in category 'halos and balloon help') -----<br> wantsHaloFromClick<br> <br>+ ^ self hasSubmorphs not!<br>- ^ self renderedMorph == self!<br><br><br></div></blockquote></div>