Selecting the current sort item will force a resort of the torrents.

This commit is contained in:
Mitchell Livingston 2006-06-19 04:30:36 +00:00
parent 1f4856ed6a
commit b91020b447
1 changed files with 16 additions and 16 deletions

View File

@ -847,23 +847,23 @@ static void sleepCallBack( void * controller, io_service_t y,
else
prevSortItem = fDateSortItem;
if (sender == prevSortItem)
return;
[prevSortItem setState: NSOffState];
[sender setState: NSOnState];
if (sender != prevSortItem)
{
[prevSortItem setState: NSOffState];
[sender setState: NSOnState];
[fSortType release];
if (sender == fNameSortItem)
fSortType = [[NSString alloc] initWithString: @"Name"];
else if (sender == fStateSortItem)
fSortType = [[NSString alloc] initWithString: @"State"];
else if (sender == fProgressSortItem)
fSortType = [[NSString alloc] initWithString: @"Progress"];
else
fSortType = [[NSString alloc] initWithString: @"Date"];
[fDefaults setObject: fSortType forKey: @"Sort"];
[fSortType release];
if (sender == fNameSortItem)
fSortType = [[NSString alloc] initWithString: @"Name"];
else if (sender == fStateSortItem)
fSortType = [[NSString alloc] initWithString: @"State"];
else if (sender == fProgressSortItem)
fSortType = [[NSString alloc] initWithString: @"Progress"];
else
fSortType = [[NSString alloc] initWithString: @"Date"];
[fDefaults setObject: fSortType forKey: @"Sort"];
}
[self sortTorrents];
}