public void StoreUndoState() { if (!Undoing) { if (!IgnoreUndoUpdate) { IBackupModule backup = null; if (ParentGroup != null && ParentGroup.Scene != null) backup = ParentGroup.Scene.RequestModuleInterface<IBackupModule>(); if (m_parentGroup != null && ParentGroup.Scene != null && (backup == null || (backup != null && !backup.LoadingPrims))) { lock (_undoLock) { if (m_undo.Count > 0) { UndoState last = m_undo.Peek(); if (last != null) { if (last.Compare(this)) return; } } UndoState nUndo = new UndoState(this); m_undo.Push(nUndo); } } } } }
public void Redo() { var redoCount = 0; lock (_redoLock) redoCount = m_redo.Count; if (redoCount > 0) { lock(_undoLock) { UndoState nUndo = new UndoState (this); m_undo.Push (nUndo); } UndoState gofwd = null; lock(_redoLock) gofwd = m_redo.Pop(); if (gofwd != null) gofwd.PlayfwdState(this); } }
public void Redo() { lock (m_redo) { if (m_redo.Count > 0) { UndoState nUndo = new UndoState(this); m_undo.Push(nUndo); UndoState gofwd = m_redo.Pop(); if (gofwd != null) gofwd.PlayfwdState(this); } } }