fix issue where we'd leave off if the selected row was 0 because we were

converting from NSNumber to int too early. Remove hack to workaround it
(ifdef'd out) as well. (bug 283615)
This commit is contained in:
pinkerton%aol.net 2005-05-09 15:56:02 +00:00
Родитель cfe1c68c6f
Коммит 37a0196ea8
1 изменённых файлов: 4 добавлений и 16 удалений

Просмотреть файл

@ -407,25 +407,13 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
{
NSMutableArray* itemsArray = [NSMutableArray arrayWithCapacity:[mHistoryOutlineView numberOfSelectedRows]];
#if 0
// XXX selectedRowEnumerator seems to have a bug where it is empty if the first item
// in the table is selected. work around that here
if ([mHistoryOutlineView selectedRow] == 0)
NSEnumerator* rowEnum = [mHistoryOutlineView selectedRowEnumerator];
NSNumber* currentRow = nil;
while ((currentRow = [rowEnum nextObject]))
{
HistoryItem * item = [mHistoryOutlineView itemAtRow:0];
HistoryItem * item = [mHistoryOutlineView itemAtRow:[currentRow intValue]];
[itemsArray addObject:item];
}
else
#endif
{
NSEnumerator* rowEnum = [mHistoryOutlineView selectedRowEnumerator];
int currentRow;
while ((currentRow = [[rowEnum nextObject] intValue]))
{
HistoryItem * item = [mHistoryOutlineView itemAtRow:currentRow];
[itemsArray addObject:item];
}
}
return itemsArray;
}