public void EndUndoGroup()
 {
     if (undoGroupDepth == 0)
     {
         throw new InvalidOperationException("There are no open undo groups");
     }
     undoGroupDepth--;
     //Util.LoggingService.Debug("Close undo group (new depth=" + undoGroupDepth + ")");
     if (undoGroupDepth == 0 && actionCountInUndoGroup > 1)
     {
         var op = new UndoQueue(undostack, actionCountInUndoGroup);
         undostack.Push(op);
         OperationPushed?.Invoke(this, new OperationEventArgs(op));
     }
 }
示例#2
0
 public void EndUndoGroup()
 {
     if (this.undoGroupDepth == 0)
     {
         throw new InvalidOperationException("There are no open undo groups");
     }
     this.undoGroupDepth--;
     if (this.undoGroupDepth == 0 && this.actionCountInUndoGroup > 1)
     {
         UndoQueue undoQueue = new UndoQueue(this.undostack, this.actionCountInUndoGroup);
         this.undostack.Push(undoQueue);
         if (this.OperationPushed != null)
         {
             this.OperationPushed(this, new OperationEventArgs(undoQueue));
         }
     }
 }
示例#3
0
 public void EndUndoGroup()
 {
     if (undoGroupDepth == 0)
         throw new InvalidOperationException("There are no open undo groups");
     undoGroupDepth--;
     //Util.LoggingService.Debug("Close undo group (new depth=" + undoGroupDepth + ")");
     if (undoGroupDepth == 0 && actionCountInUndoGroup > 1) {
         UndoQueue op = new UndoQueue(undostack, actionCountInUndoGroup);
         undostack.Push(op);
         if (OperationPushed != null) {
             OperationPushed(this, new OperationEventArgs(op));
         }
     }
 }