From bd15d2f331e34dc11656ca297e685ad8294ca04b Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Wed, 17 Nov 2010 12:21:09 -0800 Subject: [PATCH] Fix for [CPUndoManager removeAllActions] not clearing the current groupings as well. Closes #1002. Reviewed by me. --- Foundation/CPUndoManager.j | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Foundation/CPUndoManager.j b/Foundation/CPUndoManager.j index 0504a9ab5..c511d093f 100644 --- a/Foundation/CPUndoManager.j +++ b/Foundation/CPUndoManager.j @@ -594,6 +594,14 @@ if (_currentGroup == nil) */ - (void)removeAllActions { + // Close off any groupings. + while (_currentGrouping) + [self endUndoGrouping]; + + // Won't need this anymore + [self _unregisterWithRunLoop]; + + _state = CPUndoManagerNormal; _redoStack = []; _undoStack = []; _disableCount = 0;