зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
cfe1c68c6f
Коммит
37a0196ea8
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче