mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Another fix for undo/redo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20563 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3931c99308
commit
142eee89f4
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-01-16 07:59 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSUndoManager.m: Added code to properly set the
|
||||
name of the action when undo/redo is called.
|
||||
|
||||
2005-01-16 06:37 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSUndoManager.m: Check if the group is nil in
|
||||
|
|
|
@ -582,6 +582,8 @@
|
|||
*/
|
||||
- (void) redo
|
||||
{
|
||||
NSString *name = [NSString stringWithString: [self redoActionName]];
|
||||
|
||||
if (_isUndoing || _isRedoing)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
|
@ -614,6 +616,8 @@
|
|||
_isRedoing = NO;
|
||||
_group = oldGroup;
|
||||
|
||||
[[_undoStack lastObject] setActionName: name];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName: NSUndoManagerDidRedoChangeNotification
|
||||
object: self];
|
||||
|
@ -961,6 +965,7 @@
|
|||
*/
|
||||
- (void) undoNestedGroup
|
||||
{
|
||||
NSString *name = [NSString stringWithString: [self undoActionName]];
|
||||
PrivateUndoGroup *oldGroup;
|
||||
PrivateUndoGroup *groupToUndo;
|
||||
|
||||
|
@ -1014,6 +1019,8 @@
|
|||
_isUndoing = NO;
|
||||
_group = oldGroup;
|
||||
|
||||
[[_redoStack lastObject] setActionName: name];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName: NSUndoManagerDidUndoChangeNotification
|
||||
object: self];
|
||||
|
|
Loading…
Reference in a new issue