mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Make the code in undo manager slightly more efficient.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20561 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9b9802a2f7
commit
3931c99308
2 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-01-16 06:37 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSUndoManager.m: Check if the group is nil in
|
||||
endUndoGrouping before checking the count.
|
||||
|
||||
2005-01-15 06:17 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSUndoManager.m: Undid previous change here.
|
||||
|
|
|
@ -345,8 +345,11 @@
|
|||
[_redoStack removeObjectAtIndex: 0];
|
||||
}
|
||||
|
||||
if([[g actions] count] > 0)
|
||||
[_redoStack addObject: g];
|
||||
if(g != nil)
|
||||
{
|
||||
if([[g actions] count] > 0)
|
||||
[_redoStack addObject: g];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -355,8 +358,11 @@
|
|||
[_undoStack removeObjectAtIndex: 0];
|
||||
}
|
||||
|
||||
if([[g actions] count] > 0)
|
||||
[_undoStack addObject: g];
|
||||
if(g != nil)
|
||||
{
|
||||
if([[g actions] count] > 0)
|
||||
[_undoStack addObject: g];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ([g actions] != nil)
|
||||
|
|
Loading…
Reference in a new issue