protected override void DiscardUndoUnit(UndoEngine.UndoUnit unit) { base.DiscardUndoUnit(unit); if (_undoUnits.Count > 0 && Object.ReferenceEquals(unit, _undoUnits.Peek())) { _undoUnits.Pop(); } }
protected override void AddUndoUnit(UndoEngine.UndoUnit unit) { _undoUnits.Push(unit); _redoUnits.Clear(); }