Corrected undo in nsdocument.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20553 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2005-01-14 14:24:57 +00:00
parent 9bb759f549
commit 2f3da79d30
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-01-14 09:25 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSDocument.m: Minor change. The init method now sets the
flag to YES so that when a undoManager is needed, it's instantiated.
2005-01-14 05:50 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSDocument.m: corrected undoManager call in NSDocument.

View file

@ -71,6 +71,7 @@
_documentIndex = untitledCount++;
_windowControllers = [[NSMutableArray alloc] init];
fileTypes = [[self class] readableTypes];
_docFlags.hasUndoManager = YES;
/* Set our default type */
if ([fileTypes count])
@ -817,7 +818,7 @@
- (NSUndoManager *)undoManager
{
if (_undoManager == nil && [self hasUndoManager] == NO)
if (_undoManager == nil && [self hasUndoManager])
{
[self setUndoManager: AUTORELEASE([[NSUndoManager alloc] init])];
}