Time: 8 October 2019, 7:27:53.847422 pm
After a discussion with mt this commit changes the message used to set the morph position during the placement of a Morph in the DisplayScanner to #setPositionFromLayout: as it is silent. Adds a comment explaining the problems with this call in general. (There is currently no other way to do this due to way DisplayScanner is used by Morphic)
=============== Diff against Graphics-pre.420 ===============
Item was changed:
----- Method: DisplayScanner>>placeEmbeddedObject:inlineGiven: (in category 'private') -----
placeEmbeddedObject: anchoredMorphOrForm inlineGiven: textAnchorProperties
| alignedPositionY position |
alignedPositionY := self verticallyAlignEmbeddedObject: anchoredMorphOrForm given: textAnchorProperties.
position := (destX + textAnchorProperties padding left) @ alignedPositionY.
"We have to remove the offset passed to us from morphic as this embedded morph
will only be rendered later on. We now only set the position. --pre"
+ self flag: #fishy. "Setting the position of the morph during drawing can be problematic --pre"
+ anchoredMorphOrForm setPositionFromLayout: position - morphicOffset]
- anchoredMorphOrForm layoutPosition: position - morphicOffset]
ifFalse: ["we assume this to be a form"
+ self displayEmbeddedForm: anchoredMorphOrForm at: position].!
- self displayEmbeddedForm: anchoredMorphOrForm at: position].