* GormCore/GormClassInspector.m: Allow a class' name to be changed

in the GormClassInspector without it disconnecting all connections
	for that class.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@30293 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2010-05-04 23:22:50 +00:00
parent 68e2aca62e
commit 4e7a5d8005
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2010-05-04 19:25-EDT Gregory John Casamento <greg.casamento@gmail.com>
* GormCore/GormClassInspector.m: Allow a class' name to be changed
in the GormClassInspector without it disconnecting all connections
for that class.
2010-05-02 01:11-EDT Gregory John Casamento <greg.casamento@gmail.com>
Applied patch submitted by qmathe.

View file

@ -573,12 +573,13 @@ objectValueForTableColumn: (NSTableColumn *)tc
NSString *name = [self _currentClass];
NSString *newName = [sender stringValue];
GormDocument *document = (GormDocument *)[(id <IB>)NSApp activeDocument];
BOOL removed = NO;
BOOL flag = NO;
// check to see if the user wants to do this and remove the connections.
removed = [document removeConnectionsForClassNamed: name];
// check to see if the user wants to do this and rename the connections.
flag = [document renameConnectionsForClassNamed: name
toName: newName];
if(removed)
if(flag)
{
[document collapseClass: name];
[classManager renameClassNamed: name