[Pkg] The Trunk: Graphics-pre.421.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 8 17:28:03 UTC 2019

Patrick Rein uploaded a new version of Graphics to project The Trunk:

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

Name: Graphics-pre.421
Author: pre
Time: 8 October 2019, 7:27:53.847422 pm
UUID: cb121a0d-60ea-3040-8790-f523931b51d0
Ancestors: Graphics-pre.420

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.
  	anchoredMorphOrForm isMorph
  		ifTrue: [
  			"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].
- 	!

More information about the Packages mailing list