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
thanks for your response.
Unfortunately I don't want to perform an undo - I need to delete it from the undo stack.
The user must not have any possibility to undo the commands executed within the last command sequence.
now I thought that I found the solution, and it seemed to be that easy:
IAutoUndoSequence* updateSequence = CmdUtils::BeginAutoUndoSequence(frontDocUIDRef.GetDataBase());
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.
Europe, Middle East and Africa