Hi,
I need to delete a single undo step (the last step) from the undo stack of InDesign.
If I use "cmdHistory->Discard(docUIDRef);" the whole undo stack is discarded.
Or is there a way to avoid a command sequence to be added to the undo stack - which would be the bettest way for my problem.
Thanks for any help
Detlef
Hi,
now I thought that I found the solution, and it seemed to be that easy:
IAutoUndoSequence* updateSequence = CmdUtils::BeginAutoUndoSequence(frontDocUIDRef.GetDataBase());
...
...
...
CmdUtils::EndAutoUndoSequence(updateSequence);
The sequence is not added to the undo stack. And if there was no other undo step on the stack before the operation everything is fine.
But if there was something on the undo stack, and the step before is undone, the sequence also gets undone. Which in fact is not what I wanted.
So if there is any help, any idea - it would really be helpful.
Detlef
North America
Europe, Middle East and Africa
Asia Pacific