Could you check the model before and after the undo operation, to make sure all of the state is exactly what you are expecting beforehand, and to figure out exactly what state is wrong afterwards?
I can’t really tell what’s going on. Are you first loading a model? Then do you load a different model, replacing the first one?
What operation is it that you want to undo? In general, because each model has its own UndoManager, there is no state available about any previous model.
I have a file with two nodes and a link then I combine it with another file generating what the video shows (three nodes and two links).
When I want to undo the combination instead of showing the two nodes and the link I had at the beginning erases everything.
Whenever you want to modify a model or any of the data in it, you need to call StartTransaction and CommitTransaction.
Otherwise all of the changes will be bunched together into a single transaction automatically for you, since there’s no way for the UndoManager to know better what your intent is regarding splitting changes into different transactions.