[etoys-dev] Etoys: Etoys-bf.141.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Jun 24 11:02:45 EDT 2012
Bert Freudenberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-bf.141.mcz
==================== Summary ====================
Name: Etoys-bf.141
Author: bf
Time: 24 June 2012, 5:01:57 pm
UUID: 59ae04c6-44ce-4012-a72e-eed11e37d96a
Ancestors: Etoys-bf.140
Change Set: thumbnailing-sw
Date: 10 June 2012
Author: Scott Wallace
Fixes SQ-1099 - If you 'include' an object to a holder with 'show thumbnails' checked it does not become a thumbnail.
Fix applies to all four 'include' commands.
Also fixed here: a screen-update problem encountered when switching a playfield in or out of always-show-thumbnail mode when a plafield showing its cursor.
=============== Diff against Etoys-bf.140 ===============
Item was changed:
----- Method: PasteUpMorph>>updateSubmorphThumbnails (in category '*Etoys-viewing') -----
updateSubmorphThumbnails
| thumbsUp itsThumbnail heightForThumbnails maxHeightToAvoidThumbnailing maxWidthForThumbnails |
thumbsUp _ self alwaysShowThumbnail.
heightForThumbnails _ self heightForThumbnails.
maxHeightToAvoidThumbnailing _ self maxHeightToAvoidThumbnailing.
maxWidthForThumbnails _ self maximumThumbnailWidth.
self submorphs do:
[:aMorph | thumbsUp
ifTrue:
[itsThumbnail _ aMorph representativeNoTallerThan: maxHeightToAvoidThumbnailing norWiderThan: maxWidthForThumbnails thumbnailHeight: heightForThumbnails.
(aMorph == itsThumbnail)
ifFalse:
[self replaceSubmorph: aMorph by: itsThumbnail]]
ifFalse:
[(aMorph isKindOf: MorphThumbnail)
ifTrue:
+ [self replaceSubmorph: aMorph by: aMorph morphRepresented]]].
+
+ self invalidRect: self bounds!
- [self replaceSubmorph: aMorph by: aMorph morphRepresented]]]!
Item was changed:
----- Method: Player>>append: (in category 'scripts-standard') -----
append: aPlayer
"Add aPlayer to the list of objects logically 'within' me. This is visually represented by its morph becoming my costume's last submorph. Also allow text to be appended."
| aCostume |
(aPlayer isNil or: [aPlayer == self]) ifTrue: [^self].
(aPlayer isText or: [aPlayer isString])
ifTrue:
[self costume class == TextFieldMorph
ifTrue: [^self costume append: aPlayer]
ifFalse: [^self]].
(aCostume := self costume topRendererOrSelf)
addMorphNearBack: aPlayer costume.
aPlayer costume goHome. "assure it's in view"
(aCostume isKindOf: PasteUpMorph)
+ ifTrue: [self setCursor: (aCostume submorphs indexOf: aPlayer costume).
+ aCostume updateSubmorphThumbnails] "also forces redraw"!
- ifTrue: [self setCursor: (aCostume submorphs indexOf: aPlayer costume)]!
Item was changed:
----- Method: Player>>includeAtCursor: (in category 'scripts-standard') -----
includeAtCursor: aPlayer
"Add aPlayer to the list of objects logically 'within' me, at my current cursor position. ."
| aCostume |
(aPlayer isNil or: [aPlayer == self]) ifTrue: [^self].
(aPlayer isText or: [aPlayer isString])
ifTrue:
[^ self costume class == TextFieldMorph
ifTrue: [self costume append: aPlayer]
ifFalse: [self]].
aCostume := self costume topRendererOrSelf.
aPlayer costume goHome. "assure it's in view"
(aCostume isKindOf: PasteUpMorph)
ifTrue:
[aCostume addMorph: aPlayer costume asElementNumber: self getCursor.
+ aCostume updateSubmorphThumbnails] "also forces redraw"
- aCostume invalidRect: aCostume bounds]
ifFalse:
[aCostume addMorphBack: aPlayer.
self setCursor: aCostume submorphs size]!
Item was changed:
----- Method: Player>>prepend: (in category 'scripts-standard') -----
prepend: aPlayer
"Add aPlayer to the list of objects logically 'within' me. This is visually represented by its morph becoming my costume's first submorph. Also allow text to be prepended."
| aCostume |
(aPlayer isNil or: [aPlayer == self]) ifTrue: [^self].
(aPlayer isText or: [aPlayer isString])
ifTrue:
[^ self costume class == TextFieldMorph
ifTrue: [self costume prepend: aPlayer]
ifFalse: [self]].
(aCostume := self costume topRendererOrSelf)
addMorphFront: aPlayer costume.
aPlayer costume goHome. "assure it's in view"
(aCostume isKindOf: PasteUpMorph)
+ ifTrue:
+ [self setCursor: (aCostume submorphs indexOf: aPlayer costume).
+ aCostume updateSubmorphThumbnails]!
- ifTrue: [self setCursor: (aCostume submorphs indexOf: aPlayer costume)]!
More information about the etoys-dev
mailing list