* Source/NSBrowser.m (-setPath:): Fixed a bug where setting the

path to "/" would not deselect the cells.
  Based on patch by Frank Le Grand <frank.legrand@testplant.com>


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37081 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2013-09-16 18:18:07 +00:00
parent c0c27b5f8c
commit 581d7fcd0c
2 changed files with 12 additions and 6 deletions

View file

@ -593,17 +593,17 @@ static NSTextFieldCell *titleCell;
* specified path is already partially selected. If this is the
* case, we can avoid redrawing those columns.
*/
for (i = 0; i <= _lastColumnLoaded && i < numberOfSubStrings; i++)
for (i = 0; i <= _lastColumnLoaded; i++)
{
NSString *c = [[self selectedCellInColumn: i] stringValue];
if ([c isEqualToString: [subStrings objectAtIndex: i]])
if ((i < numberOfSubStrings) &&
[[[self selectedCellInColumn: i] stringValue]
isEqualToString: [subStrings objectAtIndex: i]])
{
column = i;
}
else
{
// Actually it's always called at 0 column
// Actually it's always called at 0 column, when string is "/"
[[self matrixInColumn: i] deselectAllCells];
break;
}