[squeak-dev] The Inbox: Graphics-tobe.425.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 27 16:11:53 UTC 2020

A new version of Graphics was added to project The Inbox:

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

Name: Graphics-tobe.425
Author: tobe
Time: 27 January 2020, 5:11:45.257843 pm
UUID: 2f66f6ea-c0d5-4487-bc4d-af76d67acc2e
Ancestors: Graphics-pre.424

Fixes an issue causing an infinite text composition loop when placing embedded morphs which exceed the current composition rectangle's width. The fix entails consistently returning Booleans which indicate whether the morph still fits.

=============== Diff against Graphics-pre.424 ===============

Item was changed:
  ----- Method: CharacterScanner>>embeddedObject (in category 'stop conditions') -----
  	pendingKernX := 0.
  	((text attributesAt: lastIndex) reject: [:each | each anchoredMorph isNil])
+ 		ifNotEmpty: [:attributes | (self placeEmbeddedObjectsFrom: attributes) ifTrue: [^ true]].
- 		ifNotEmpty: [:attributes | self placeEmbeddedObjectsFrom: attributes].
  	self setFont.
  	"Note: if ever several objects are embedded on same character, only indent lastIndex once"
  	lastIndex := lastIndex + 1.

Item was changed:
  ----- Method: CharacterScanner>>placeEmbeddedObjectsFrom: (in category 'private-text-anchor') -----
  placeEmbeddedObjectsFrom: textAttributes
  	textAttributes do: [:attr |
  		"Try to placeEmbeddedObject: - if it answers false, then there's no place left"
+ 		(self placeEmbeddedObjectFrom: attr) ifFalse: [^ self crossedX]].
+ 	^ false!
- 		(self placeEmbeddedObjectFrom: attr) ifFalse: [^ self crossedX]]!

More information about the Squeak-dev mailing list