David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.1366.mcz==================== Summary ====================
Name: Morphic-dtl.1366
Author: dtl
Time: 15 November 2017, 9:08:25.260401 pm
UUID: e8c69c1d-a8e7-43d5-ab72-50c1f87eaf22
Ancestors: Morphic-dtl.1365
Update from Bob, resolves a related issue.
To:
[hidden email]
From: Bob Arning <
[hidden email]>
Date: Wed, 15 Nov 2017 20:40:28 -0500
Subject: Re: [squeak-dev] ActiveWorld and World globals
I did encounter an emergency evaluator after posting the first code. My
fix for that one is attached.
=============== Diff against Morphic-dtl.1365 ===============
Item was changed:
----- Method: WorldState>>displayWorld:submorphs: (in category 'update cycle') -----
displayWorld: aWorld submorphs: submorphs
"Update this world's display."
| deferredUpdateMode handsToDraw allDamage handDamageRects worldDamageRects |
submorphs do: [:m | m fullBounds]. "force re-layout if needed"
self checkIfUpdateNeeded ifFalse: [^ self]. "display is already up-to-date"
deferredUpdateMode := self doDeferredUpdatingFor: aWorld.
deferredUpdateMode ifFalse: [self assuredCanvas].
+ worldDamageRects := self drawWorld: aWorld submorphs: submorphs invalidAreasOn: self assuredCanvas. "repair world's damage on canvas"
- worldDamageRects := self drawWorld: aWorld submorphs: submorphs invalidAreasOn: canvas. "repair world's damage on canvas"
"self handsDo:[:h| h noticeDamageRects: worldDamageRects]."
handsToDraw := self selectHandsToDrawForDamage: worldDamageRects.
handDamageRects := handsToDraw collect: [:h | h savePatchFrom: canvas].
allDamage := worldDamageRects, handDamageRects.
handsToDraw reverseDo: [:h | canvas fullDrawMorph: h]. "draw hands onto world canvas"
"*make this true to flash damaged areas for testing*"
Preferences debugShowDamage ifTrue: [aWorld flashRects: allDamage color: Color black].
canvas finish: allDamage.
"quickly copy altered rects of canvas to Display:"
deferredUpdateMode
ifTrue: [self forceDamageToScreen: allDamage]
ifFalse: [canvas showAt: aWorld viewBox origin invalidRects: allDamage].
handsToDraw do: [:h | h restoreSavedPatchOn: canvas]. "restore world canvas under hands"
Display deferUpdates: false; forceDisplayUpdate.
!