[squeak-dev] The Trunk: Morphic-mt.1118.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 19 10:20:57 UTC 2016


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1118.mcz

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

Name: Morphic-mt.1118
Author: mt
Time: 19 April 2016, 12:19:58.032049 pm
UUID: 1b5b0494-89bc-aa46-a621-403a2aaf6cd3
Ancestors: Morphic-mt.1117

Improves documentation and usage of #refreshWorld to avoid direct calls to #displayWorldSafely, which requires a check whether the morph in in a world or not.

=============== Diff against Morphic-mt.1117 ===============

Item was changed:
  ----- Method: Morph>>flash (in category 'macpal') -----
  flash
  	| originalColor |
  	originalColor := self color.
  	[ self color:
  		(originalColor
  			ifNil: [ Color black ]
  			ifNotNil: [( (originalColor alpha: 1) adjustSaturation: 0.8 brightness: 0) negated ]) ]
  		ensure:
+ 			[ self refreshWorld.
- 			[ self world ifNotNil: [ : w | w displayWorldSafely ].
  			self color: originalColor ]!

Item was changed:
  ----- Method: Morph>>refreshWorld (in category 'drawing') -----
  refreshWorld
+ 	"If this morph is in a world, refresh the world. This can be used to immediately redraw a morph after it changed. Note that you should use this call rather sparsely because it bypasses Morphics damage recording mechanism."
+ 	
+ 	self world ifNotNil: [:w | w displayWorldSafely].!
- 	| aWorld |
- 	(aWorld := self world) ifNotNil: [aWorld displayWorldSafely]
- !

Item was changed:
  ----- Method: PluggableListMorph>>changeModelSelection: (in category 'model access') -----
  changeModelSelection: anInteger
  	" Change the model's selected item index to be anInteger. Enable the pre selection highlight. Step the World forward to let the pre selection highlight take effect. "
  
  	self rowAboutToBecomeSelected: (self uiIndexFor: anInteger).
+ 	self refreshWorld.
- 	World displayWorldSafely.
  	setIndexSelector ifNotNil: [
  		model perform: setIndexSelector with: anInteger ].!

Item was changed:
  ----- Method: SVColorSelectorMorph>>hideLocation (in category 'as yet unclassified') -----
  hideLocation
  	"Hide the location morph and update the display."
  	
  	self locationMorph visible: false.
+ 	self refreshWorld.!
- 	World displayWorldSafely.!

Item was changed:
  ----- Method: SVColorSelectorMorph>>showLocation (in category 'as yet unclassified') -----
  showLocation
  	"Show the location morph and update the display."
  	
  	self locationMorph visible: true.
+ 	self refreshWorld.!
- 	World displayWorldSafely.!



More information about the Squeak-dev mailing list