Hi.
I have seen, that DoCancel() of ViewModelBase calls
undo.CancelEdit();
undo.BeginEdit();
I ask me, why is DoCancel() calling Beginedit()? - I run in the fallowing Problem:
I open a EditableRoot-Object vor Editing. There is calling a BeginEdit(). Now, I open a Child-object of the Root-Object for Editing. There is now a BeginEdit on the Child. Now, I cancel the ChildEdit. DoCancel() now calls CancelEdit() and BeginEdit(). When I save now the root-object, I run into a EditLevel-Mismatch. The reason about this is the BeginEdit()-call of DoCancel(). I ask me now, why is DoCancel() calling also BeginEdit() and what I am doing wrong.
Thanks for your help.
Best Regards, Thomas
If it didn't, the user would then make some changes and hit cancel again, and nothing would happen.
For your child, I think in it's ViewModel class you would set ManageObjectLifetime to false to disable that behavior since it's covered by the parent.
Hi Andy
Thank you for your reply. I have solved my problem now with setting ManageObjectLifetime to false in the "Child-VM".
Thomas
Copyright (c) Marimer LLC