/// <summary> /// Performs the next redo operation. /// </summary> public void Redo() { if (!this.CanRedo) { return; } IUndoRedoState state = this.m_Redo.Pop(); state.Redo(); this.m_Undo.Push(state); }
/// <summary> /// Pushes a new IUndoRedoState into the cache. Automatically /// clears the redo stack. /// </summary> /// <param name="state">The state to push into the cache.</param> public void Push(IUndoRedoState state) { this.m_Undo.Push(state); this.m_Redo.Clear(); }