Corrected problem with NSOutlineView.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21539 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2005-07-26 02:22:28 +00:00
parent 9f152a1fa2
commit c727a3c73f
2 changed files with 9 additions and 2 deletions

View file

@ -516,11 +516,13 @@ static NSImage *unexpandable = nil;
}
/**
* Returns the corresponding row in the outline view for the given item.
* Returns the corresponding row in the outline view for the given item. Returns
* -1 if item is nil or not found.
*/
- (int)rowForItem: (id)item
{
return [_items indexOfObject: item];
int row = [_items indexOfObject: item];
return (row == NSNotFound) ? -1 : row;
}
/**