Exemplo n.º 1
0
        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 (m_undo)
                        {
                            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);
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        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);
                }
            }
        }