fix a display bug when pausing/resuming a torrent when filtering torrents by state

This commit is contained in:
Mitchell Livingston 2008-01-20 20:38:51 +00:00
parent e1fa469d5a
commit 4d0e40c576
1 changed files with 5 additions and 1 deletions

View File

@ -263,7 +263,11 @@
NSEnumerator * enumerator = [torrents objectEnumerator];
NSMutableIndexSet * indexSet = [[NSMutableIndexSet alloc] init];
while ((torrent = [enumerator nextObject]))
[indexSet addIndex: [fTorrents indexOfObject: torrent]];
{
unsigned int index = [fTorrents indexOfObject: torrent];
if (index != NSNotFound)
[indexSet addIndex: index];
}
[self selectRowIndexes: indexSet byExtendingSelection: NO];
[indexSet release];