Hot Door CORE Forum
UndoChanges when dragging, creating art - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: General discussion (http://hotdoorcore.com/forum/forumdisplay.php?fid=3)
+--- Thread: UndoChanges when dragging, creating art (/showthread.php?tid=76)



UndoChanges when dragging, creating art - Rick Johnson - 05-31-2016

In the Tool sample, dragging the tool calls draw::ellipse, but with the Adobe SDK one has to call sAIUndo->UndoChanges( ) at the beginning of each drag iteration. Is this because the ellipse automatically disappears when the function goes out of scope? If my function draws custom art, I presume I need to call hdi::core::CurrentDocument::undo before redrawing the art at a new size or orientation; Is this correct?


RE: UndoChanges when dragging, creating art - garrett - 06-03-2016

Yes, undo is still part of the "drawing/dragging lifecycle", but CORE handles it automatically when the proper mouse events are issued by Illustrator.


RE: UndoChanges when dragging, creating art - Rick Johnson - 06-03-2016

Thanks, Garrett, that's a really cool feature. The more I use CORE, the more I come to appreciate its forethought and elegance. :-)