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

@ -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])];
}