diff --git a/macosx/Controller.m b/macosx/Controller.m index 12719054a..594b4e42a 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -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]; }