public override HistoryMemento PerformUndo() { HistoryMemento redoMemento = new HistoryMementoDeleteDrawing(metadata, managerId, drawingId, drawingName); redoMemento.CommandName = commandName; metadata.DeleteDrawing(managerId, drawingId); return(redoMemento); }
public void DeleteHitDrawing() { Keyframe keyframe = metadata.HitKeyframe; AbstractDrawing drawing = metadata.HitDrawing; if (keyframe == null || drawing == null) { return; } HistoryMemento memento = new HistoryMementoDeleteDrawing(metadata, keyframe.Id, drawing.Id, drawing.ToolDisplayName); metadata.DeleteDrawing(keyframe.Id, drawing.Id); metadata.HistoryStack.PushNewCommand(memento); }