diff --git a/ChangeLog b/ChangeLog index 827b92d26..78cd72872 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-14 09:25 Gregory John Casamento + + * 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 * Source/NSDocument.m: corrected undoManager call in NSDocument. diff --git a/Source/NSDocument.m b/Source/NSDocument.m index ddbb2feb7..4c075b569 100644 --- a/Source/NSDocument.m +++ b/Source/NSDocument.m @@ -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])]; }