void FullMeshAction(string actionName, Action action) { MeshFullState oldState = items.CurrentMeshFull; action(); MeshFullState currentState = items.CurrentMeshFull; undo.PrepareUndo(actionName, Invocation.Create(oldState, currentState, actionName, SwapMeshFullState)); }
void SwapMeshFullState(MeshFullState old, MeshFullState current, string actionName) { Trace.WriteLine("swapMeshFullStateWithOld:current:actionName:"); items.CurrentMeshFull = old; undo.PrepareUndo(actionName, Invocation.Create(current, old, actionName, SwapMeshFullState)); itemsController.UpdateSelection(); meshController.UpdateSelection(); Manipulated = meshController; }