mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
Selecting the current sort item will force a resort of the torrents.
This commit is contained in:
parent
1f4856ed6a
commit
b91020b447
1 changed files with 16 additions and 16 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue