Mental: I noticed that editing a text node in the XML editor does not complete transaction (unlike e.g. editing an attribute) and thus breaks undo. So I inserted sp_document_done() into sp_xmlview_content_changed() in widgets/sp-xmlview-content.cpp. This fixed the broken undo, but:
1. I could not find out what document we are editing, so I did the document_done function on SP_DT_DOCUMENT (SP_ACTIVE_DESKTOP). Can you rewrite it without ACTIVE_DESKTOP?
2. Now that the text node changes are undoable, undoing editing a text object in XML editor has the same problem as in this bug:
http://sourceforge.net/tracker/index.php?func=detail&aid=861462&grou...
That is, if you create a text node, switch to any other tool, and then reproduce this bug's sequence but using XML editor instead of F8, the result is the same. Which proves that the source of the problem is not text tool, but the wrong way text node changes are logged and undone by the repr logger. It was only obvious in text tool because no other tools create/edit text nodes. Can you please have a look into it?
_________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus&pgmarket=en-ca&RU=http%3a%2...