mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-24 23:11:04 +00:00
Minor fix to remap name if changed in custom class map.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18760 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
04a1c007b5
commit
d28446884d
2 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-03-04 01:08 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* 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 <greg_casamento@yahoo.com>
|
2004-03-03 11:00 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* GormCustomClassInspector.[hm]: Removed _currentSelection
|
* GormCustomClassInspector.[hm]: Removed _currentSelection
|
||||||
|
|
|
@ -2501,6 +2501,8 @@ static NSImage *classesImage = nil;
|
||||||
{
|
{
|
||||||
id oldObject;
|
id oldObject;
|
||||||
NSString *oldName;
|
NSString *oldName;
|
||||||
|
NSMutableDictionary *cc = [classManager customClassMap];
|
||||||
|
NSString *className = nil;
|
||||||
|
|
||||||
if (object == nil)
|
if (object == nil)
|
||||||
{
|
{
|
||||||
|
@ -2569,7 +2571,6 @@ static NSImage *classesImage = nil;
|
||||||
aName = [aName copy]; /* Make sure it's immutable */
|
aName = [aName copy]; /* Make sure it's immutable */
|
||||||
[nameTable setObject: object forKey: aName];
|
[nameTable setObject: object forKey: aName];
|
||||||
NSMapInsert(objToName, (void*)object, (void*)aName);
|
NSMapInsert(objToName, (void*)object, (void*)aName);
|
||||||
RELEASE(aName);
|
|
||||||
if (oldName != nil)
|
if (oldName != nil)
|
||||||
{
|
{
|
||||||
[nameTable removeObjectForKey: oldName];
|
[nameTable removeObjectForKey: oldName];
|
||||||
|
@ -2578,6 +2579,19 @@ static NSImage *classesImage = nil;
|
||||||
{
|
{
|
||||||
[objectsView refreshCells];
|
[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
|
- (void) setObject: (id)anObject isVisibleAtLaunch: (BOOL)flag
|
||||||
|
|
Loading…
Reference in a new issue