1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

Make sure groups are expanded/collapsed correctly when filtering on 10.6

This commit is contained in:
Mitchell Livingston 2012-01-19 00:25:08 +00:00
parent 3262566ab4
commit 52e447603d

View file

@ -2401,13 +2401,6 @@ 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];
}
@ -2424,8 +2417,21 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
[NSAnimationContext endGrouping];
}
else
{
[fTableView reloadData];
if (groupRows)
{
for (TorrentGroup * group in fDisplayedTorrents)
{
if ([fTableView isGroupCollapsed: [group groupIndex]])
[fTableView collapseItem: group];
else
[fTableView expandItem: group];
}
}
}
if (!onLion)
[fTableView selectValues: selectedValuesSL];