<div dir="ltr">This fixes one issue but it's not quite there yet.<div>If the world/ PasteUpMorph has halo open I can't blue click get halo on a rotated morph within it.</div><div>Other morphs work.</div><div><br></div><div>Best,</div><div>Karl</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 4, 2018 at 3:59 AM <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Chris Muller uploaded a new version of Morphic to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Morphic-cmm.1462.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Morphic-cmm.1462.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-cmm.1462<br>
Author: cmm<br>
Time: 3 September 2018, 8:57:57.317349 pm<br>
UUID: 048b437d-9cac-4a1e-a0e9-0e672aca738f<br>
Ancestors: Morphic-kfr.1460<br>
<br>
Fix halo-invocation on rotated morphs.<br>
<br>
=============== Diff against Morphic-kfr.1460 ===============<br>
<br>
Item was changed:<br>
  ----- Method: PasteUpMorph>>tryInvokeHalo: (in category 'events-processing') -----<br>
  tryInvokeHalo: aUserInputEvent <br>
        "Invoke halos around the top-most world container at aUserInputEvent's #position.  If it was already halo'd, zero-in on its next inward component morph at that position.  Holding Shift during the click reverses this traversal order."<br>
        | stack innermost haloTarget |<br>
        Preferences noviceMode ifTrue: [ ^ self ].<br>
        Morph haloForAll ifFalse: [ ^ self ].<br>
        "the stack is the top-most morph to bottom-most."<br>
        stack := (self morphsAt: aUserInputEvent position unlocked: true) select:<br>
                [ : each | each wantsHaloFromClick or: [ each handlesMouseDown: aUserInputEvent ] ].<br>
        innermost := aUserInputEvent hand halo<br>
                ifNil: [ stack first ]<br>
                ifNotNil:<br>
                        [ : existingHalo | stack allButFirst "existingHalo is first on the stack, not a target"<br>
                                detect: [ : each | each owner == self ]<br>
                                ifFound:<br>
                                        [ : worldContainer | "Is existingHalo's target part of the same worldContainer as the morph clicked?"<br>
                                        (existingHalo target withAllOwners includes: worldContainer)<br>
                                                ifTrue: [ "same hierarchy, let #transferHalo: continue to handle it for now."  ^ self ]<br>
                                                ifFalse:<br>
                                                        [ "different hierarchy, remove + add."<br>
                                                        aUserInputEvent hand removeHalo.<br>
                                                        aUserInputEvent shiftPressed<br>
                                                                ifTrue: [ stack second "first is still the just removed halo" ]<br>
                                                                ifFalse: [ worldContainer ] ] ]<br>
                                ifNone: [ "Shouldn't get here, but defensive code."  self ] ].<br>
        "If modifier key is pressed, start at innermost (the target), otherwise the outermost (direct child of the world (self))."<br>
+       haloTarget  := (innermost == self or: [aUserInputEvent shiftPressed])<br>
-       haloTarget  := aUserInputEvent shiftPressed<br>
                ifTrue: [ innermost ]<br>
+               ifFalse:<br>
+                        [ "Find the outermost owner that wants it."<br>
+                       innermost withAllOwners reversed allButFirst<br>
+                               detect: [ : each | each wantsHaloFromClick ]<br>
+                               ifNone: [ "haloTarget has its own mouseDown handler, don't halo."  ^ self ] ].<br>
-               ifFalse: [ innermost == self ifTrue: [innermost] ifFalse: [(innermost withAllOwners copyWithout: self) last] ].<br>
-       haloTarget wantsHaloFromClick ifFalse: [ "haloTarget has its own event handler." ^ self ].<br>
        "Now that we have the haloTarget, show the halo."<br>
        aUserInputEvent hand<br>
                newMouseFocus: haloTarget<br>
                event: aUserInputEvent.<br>
        haloTarget invokeHaloOrMove: aUserInputEvent.<br>
        "aUserInputEvent has been consumed, don't let it cause any further side-effects."<br>
        aUserInputEvent ignore!<br>
<br>
<br>
</blockquote></div>