diff options
Diffstat (limited to 'Source/SPProcessListController.m')
-rw-r--r-- | Source/SPProcessListController.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m index afb13634..886e6f2b 100644 --- a/Source/SPProcessListController.m +++ b/Source/SPProcessListController.m @@ -469,6 +469,16 @@ return (![object isNSNull]) ? object : [prefs stringForKey:SPNullValue]; } +/** + * Table view delegate method. Called when the user changes the sort by column. + */ +- (void)tableView:(NSTableView *)tableView sortDescriptorsDidChange:(NSArray *)oldDescriptors +{ + [processesFiltered sortUsingDescriptors:[tableView sortDescriptors]]; + + [tableView reloadData]; +} + #pragma mark - #pragma mark Text field delegate methods @@ -537,6 +547,10 @@ [self _updateServerProcessesFilterForFilterString:[filterProcessesSearchField stringValue]]; } + // Reset sort descriptors + [processesFiltered sortUsingDescriptors:[processListTableView sortDescriptors]]; + + // Reload data [processListTableView reloadData]; // Enable controls |