From b91020b4477eaea01c424f7523d3c2e8b14c61b1 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 19 Jun 2006 04:30:36 +0000 Subject: [PATCH] Selecting the current sort item will force a resort of the torrents. --- macosx/Controller.m | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 406d5f9fc..4d68237de 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -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]; }