Can anyone point me to some code that would serve as a nice illustration of how the Inkscape undo system works? I've been reading the Session and SimpleSession classes and the way they are used in the functions in document-undo.cpp; is that a good place to begin, or are there better starting points?
In particular, I'm wondering what the best way to clear the undo and redo stacks is, as it's crucial to the correct functioning of Inkboard. When a user synchronizes his or her document with another user or with a chatroom, that synchronized state must become the new original state of the user's document. sp_document_clear_undo and sp_document_clear_redo, from their code, seem to be what I want, but I can't quite figure out how to use them to attain the desired effect.
-- David