mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Corrected problem with undo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20550 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
00e4fbc778
commit
38bd9809e8
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-01-14 05:43 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSUndoManager.m: Fix forward invocation to not add
|
||||
a group when it doesn't contain any actions.
|
||||
|
||||
2005-01-08 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/NSCalendarDate.m: fix time zone for %z format with
|
||||
|
|
|
@ -340,19 +340,23 @@
|
|||
{
|
||||
if (_isUndoing)
|
||||
{
|
||||
if (_levelsOfUndo > 0 && [_redoStack count] == _levelsOfUndo)
|
||||
if (_levelsOfUndo > 0 && [_redoStack count] == _levelsOfUndo && [[g actions] count] > 0)
|
||||
{
|
||||
[_redoStack removeObjectAtIndex: 0];
|
||||
}
|
||||
[_redoStack addObject: g];
|
||||
|
||||
if([[g actions] count] > 0)
|
||||
[_redoStack addObject: g];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_levelsOfUndo > 0 && [_undoStack count] == _levelsOfUndo)
|
||||
if (_levelsOfUndo > 0 && [_undoStack count] == _levelsOfUndo && [[g actions] count] > 0)
|
||||
{
|
||||
[_undoStack removeObjectAtIndex: 0];
|
||||
}
|
||||
[_undoStack addObject: g];
|
||||
|
||||
if([[g actions] count] > 0)
|
||||
[_undoStack addObject: g];
|
||||
}
|
||||
}
|
||||
else if ([g actions] != nil)
|
||||
|
|
Loading…
Reference in a new issue