improve on r13164

This commit is contained in:
Mitchell Livingston 2012-01-14 20:11:51 +00:00
parent 66a268bb7f
commit 56a0a90b1e
1 changed files with 7 additions and 4 deletions

View File

@ -2403,10 +2403,6 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
[fDisplayedTorrents setArray: [groupsByIndex allValues]];
//actually expand group rows
for (TorrentGroup * group in fDisplayedTorrents)
[fTableView expandItem: group];
//we need the groups to be sorted, and we can do it without moving items in the table, too!
NSSortDescriptor * groupDescriptor = [NSSortDescriptor sortDescriptorWithKey: @"groupOrderValue" ascending: YES];
[fDisplayedTorrents sortUsingDescriptors: [NSArray arrayWithObject: groupDescriptor]];
@ -2417,6 +2413,13 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
if (onLion)
[fTableView insertItemsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fDisplayedTorrents count])] inParent: nil withAnimation: NSTableViewAnimationEffectFade];
if (groupRows)
{
//actually expand group rows
for (TorrentGroup * group in fDisplayedTorrents)
[fTableView expandItem: group];
}
if (selectedValues)
[fTableView selectValues: selectedValues];
}