Corrected bug which was causing a crash after attempting to add to a class which cannot be added to.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@17934 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-10-20 03:08:54 +00:00
parent f9a6d82c8f
commit d8c22f676a
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2003-10-19 23:12 Gregory John Casamento <greg_casamento@yahoo.com>
* GormOutlineView.m: Corrected issue in addAttributeToClass which
was adding to the total line count before validating that the item
was added successfully.
2003-10-19 01:00 Gregory John Casamento <greg_casamento@yahoo.com>
* Palettes/0Menus/GormMenuInspectors.m: setObject fix for

View file

@ -182,10 +182,10 @@ static NSColor *darkGreyBlueColor = nil;
NSString *name = nil;
GormOutletActionHolder *holder = [[GormOutletActionHolder alloc] init];
_numberOfRows += 1;
name = [_dataSource outlineView: self addNewActionForClass: _itemBeingEdited];
if (name != nil)
{
_numberOfRows += 1;
[holder setName: name];
insertionPoint = [_items indexOfObject: item];
[_items insertObject: holder atIndex: insertionPoint + 1];