예제 #1
0
        internal void StartUndoGroup(String description)
        {
            UndoGroup ug = new UndoGroup(this, description);

            _currentUndoGroup = ug;
            _actions.Push(ug);
        }
예제 #2
0
        internal void EndUndoGroup(bool keepChanges)
        {
            if (_currentUndoGroup == null)
            {
                return;
            }

            // group contains no items; or user doesn't want changes to part of undo
            //
            if (_currentUndoGroup.Count == 0 || !keepChanges)
            {
                UndoGroup ug = _actions.Pop() as UndoGroup;                     // get rid of the empty group
                if (ug != _currentUndoGroup)
                {
                    throw new Exception("Internal logic error: EndGroup doesn't match StartGroup");
                }
            }
            _currentUndoGroup = null;
        }
예제 #3
0
파일: Undo.cs 프로젝트: mnisl/OD
		internal void EndUndoGroup(bool keepChanges)
		{
			if (_currentUndoGroup == null)
				return;

			// group contains no items; or user doesn't want changes to part of undo
			//   
			if (_currentUndoGroup.Count == 0 || !keepChanges)	
			{
				UndoGroup ug = _actions.Pop() as UndoGroup;	// get rid of the empty group
				if (ug != _currentUndoGroup)		
					throw new Exception("Internal logic error: EndGroup doesn't match StartGroup");
			}
			_currentUndoGroup = null;
		}
예제 #4
0
파일: Undo.cs 프로젝트: mnisl/OD
		internal void StartUndoGroup(String description)
		{
			UndoGroup ug = new UndoGroup(this, description);
			_currentUndoGroup = ug;
			_actions.Push(ug);
		}