示例#1
0
        /// <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);
        }
示例#2
0
 /// <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();
 }