[squeak-dev] The Trunk: Morphic-nice.191.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: Morphic-nice.191.mcz

commits-2
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.191.mcz

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

Name: Morphic-nice.191
Author: nice
Time: 25 September 2009, 7:41:07 am
UUID: adaf0573-f44a-0340-9626-2b9f99d02c32
Ancestors: Morphic-ar.190

Fix for http://bugs.squeak.org/view.php?id=1035

Changing the extent of a PolygonMorph does also change its origin...
This was not expected by some container Morph: when container were resized, the PolygonMorph contents was moved weirdly, sometimes outside the container....

For fun, this did happen only when growing the container size, but not when shrinking...
See super bounds: and order of message send #extent:/#position: or #position:/#extent: to understand the bug...

The solution I adopted is to always use the extent:/position:  order in the PolygonMorph.

=============== Diff against Morphic-ar.190 ===============

Item was added:
+ ----- Method: PolygonMorph>>bounds: (in category 'geometry') -----
+ bounds: newBounds
+ "This method has to be reimplemented since self extent: will also change self bounds origin,
+ super bounds would leave me in wrong position when container is growing.
+ Always change extent first then position"
+
+ self extent: newBounds extent; position: newBounds topLeft
+ !