Example #1
0
        public void RecordUndoAction(string strDesc, UndoMgr undo)
        {
            if (undo == null)
            {
                return;
            }

            UndoData data = GetUndoData();

            // Don't record anything if there aren't any changes
            if (!data.Equals(m_snapshot))
            {
                UndoAction_MapEdit action = new UndoAction_MapEdit(undo, this, m_snapshot, data, strDesc);
                undo.Push(action);

                // Update the snapshot for the next UndoAction
                RecordSnapshot();
            }
        }
Example #2
0
        public void RecordUndoAction(string strDesc, UndoMgr undo)
        {
            if (undo == null)
                return;

            UndoData data = GetUndoData();

            // Don't record anything if there aren't any changes
            if (!data.Equals(m_snapshot))
            {
                UndoAction_MapEdit action = new UndoAction_MapEdit(undo, this, m_snapshot, data, strDesc);
                undo.Push(action);

                // Update the snapshot for the next UndoAction
                RecordSnapshot();
            }
        }