Nicolas Cellier uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-nice.48.mcz==================== Summary ====================
Name: MorphicExtras-nice.48
Author: nice
Time: 4 October 2009, 8:33:03 am
UUID: 2321e50d-1bba-458c-a955-04ce93e2c54e
Ancestors: MorphicExtras-ar.47
Fix bug
http://bugs.squeak.org/view.php?id=6732In SketchEditorMorph, using undo on a polygon put it in a non-functioning state.
=============== Diff against MorphicExtras-ar.47 ===============
Item was changed:
----- Method: SketchEditorMorph>>polyFreeze (in category 'actions & preps') -----
polyFreeze
"A live polygon is on the painting. Draw it into the painting and
delete it."
| poly |
self polyEditing ifFalse:[^self].
+ (poly := self valueOfProperty: #polygon)
+ ifNil:
+ [self polyEditing: false.
+ ^ self].
- (poly := self valueOfProperty: #polygon) ifNil: [^ self].
poly drawOn: formCanvas.
poly delete.
self setProperty: #polygon toValue: nil.
self polyEditing: false.!
Item was changed:
----- Method: SketchEditorMorph>>undo: (in category 'start & finish') -----
undo: evt
"revert to a previous state. "
| temp poly pen |
self flag: #bob. "what is undo in multihand environment?"
undoBuffer ifNil: [^Beeper beep]. "nothing to go back to"
(poly := self valueOfProperty: #polygon) ifNotNil:
[poly delete.
self setProperty: #polygon toValue: nil.
+ self polyEditing: false.
^self].
temp := paintingForm.
paintingForm := undoBuffer.
undoBuffer := temp. "can get back to what you had by undoing again"
pen := self get: #paintingFormPen for: evt.
pen ifNil: [^Beeper beep].
pen setDestForm: paintingForm.
formCanvas := paintingForm getCanvas. "used for lines, ovals, etc."
formCanvas := formCanvas copyOrigin: self topLeft negated
clipRect: (0 @ 0 extent: bounds extent).
self render: bounds!