Side-effects of not using a transaction

Hi Walter

Other than having having no undo/redo support, are there any other side-effects of not using a transaction to perform diagram changes?

Here is my scenario:
I have a diagram action that needs to perform two diagram transactions. I’m trying to figure out how I can get the UndoManager to view the action as one transaction, not two. I thought about making the second transaction non-transactional but I’m not sure what effect that would have on the internal state of the diagram.

If not using transactions is a bad idea, is it possible to use nested transactions?


Yes, there could be no or delayed update of the visual tree if you don’t finish a transaction.

Yes, you can nest transactions. Nested rollbacks of course only “undo” the nested changes. Only committing the top-level transaction actually causes the edit history to be augmented and then allow undo/redo commands to execute.