diff --git a/ChangeLog b/ChangeLog index 42b0f700..84d04961 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-03-04 01:08 Gregory John Casamento + + * GormDocument.m: [GormDocument setName:forObject:] added + code to remap the name of an object if it is in the custom + class map. + 2004-03-03 11:00 Gregory John Casamento * GormCustomClassInspector.[hm]: Removed _currentSelection diff --git a/GormDocument.m b/GormDocument.m index 12512076..274a3916 100644 --- a/GormDocument.m +++ b/GormDocument.m @@ -2501,6 +2501,8 @@ static NSImage *classesImage = nil; { id oldObject; NSString *oldName; + NSMutableDictionary *cc = [classManager customClassMap]; + NSString *className = nil; if (object == nil) { @@ -2569,7 +2571,6 @@ static NSImage *classesImage = nil; aName = [aName copy]; /* Make sure it's immutable */ [nameTable setObject: object forKey: aName]; NSMapInsert(objToName, (void*)object, (void*)aName); - RELEASE(aName); if (oldName != nil) { [nameTable removeObjectForKey: oldName]; @@ -2578,6 +2579,19 @@ static NSImage *classesImage = nil; { [objectsView refreshCells]; } + + // check the custom classes map and replace the appropriate + // object, if a mapping exists. + if(cc != nil) + { + className = [cc objectForKey: oldName]; + if(className != nil) + { + [cc removeObjectForKey: oldName]; + [cc setObject: className forKey: aName]; + } + } + RELEASE(aName); } - (void) setObject: (id)anObject isVisibleAtLaunch: (BOOL)flag