## [squeak-dev] The Inbox: Morphic-ct.2033.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Aug 24 16:02:58 UTC 2022

```A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.2033.mcz

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

Name: Morphic-ct.2033
Author: ct
Time: 24 August 2022, 6:02:53.835133 pm
UUID: 6b380927-4044-c24d-a1cb-b4f6feb6dae3
Ancestors: Morphic-ct.2031

Fixes an drawing/invalidation issue with TransformMorphs. When an ancestor of a TransformMorph is moved directly, it invalidates both its old and its new bounds, so the damageRect can legitimately excess the bounds of the TransformMorph. Solution: Remove the intersection of the damage rect with the TransformMorph's bounds.

Reprocase:
m := Morph new.
rotationDegrees: 15;
yourself.

f openInWorld.
f center: f world center.

"Do this separately"
m position: m position + 10.

=============== Diff against Morphic-ct.2031 ===============

Item was changed:
----- Method: TransformMorph>>invalidRect:from: (in category 'change reporting') -----
invalidRect: damageRect from: aMorph
"Translate damage reports from submorphs by the scrollOffset."
+
+ 	^ super
+ 		invalidRect: (aMorph == self
+ 			ifTrue: [damageRect]
+ 			ifFalse: [(transform localBoundsToGlobal: damageRect) expanded])
+ 		from: self!
- 	aMorph == self
- 		ifTrue:[super invalidRect: damageRect from: self]
- 		ifFalse:[super invalidRect: (((transform localBoundsToGlobal: damageRect) intersect: bounds) expanded) from: self].!

```