mhoover12

Undo Move Graphic

Discussion created by mhoover12 on Jul 19, 2011
Latest reply on Jul 22, 2011 by mhoover12
Hello,

I have been successfully implementing the UndoManager for a variety of tasks, but I have gotten stuck and could use some help.

My UndoManager needs to be able to handle edits applied via the Edit Toolbar.  It works great for Scale and Rotate, but Move doesn't undo.

To implement this, my Undo and Redo actions have references to the old and new graphic (before and after the edit) and use Graphic.setGeometry(geometry) to undo/redo the actions.  Like I said, this works beautifully for Scale and Rotate, but my Moves don't Undo.

So my question is, is the graphic's location not stored in the geometry of a graphic?  Or is something else, unique to the positioning of a graphic, causing this to fail?

If anyone could provide any help, that would be great.

Thanks,
Mark

Outcomes