From 38c2685a687658184a577db316c1fa1c1fc3c781 Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Wed, 16 Mar 2011 19:07:53 +0000 Subject: [PATCH] Send the sort message to the data source not the delegate. This should fix bug #32806. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32624 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSOutlineView.m | 4 ++-- Source/NSTableView.m | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d127e4a1f..6630f356c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-16 Fred Kiefer + + * Source/NSOutlineView.m (-_didChangeSortDescriptors:), + * Source/NSTableView.m (-_didChangeSortDescriptors:): Send the + message to the data source not the delegate. + 2011-03-16 06:30-EDT Gregory John Casamento * Source/GSThemeMenu.m: Use copy in setMenu:forWindow: instead of diff --git a/Source/NSOutlineView.m b/Source/NSOutlineView.m index 7d9dee22a..b197dc4ba 100644 --- a/Source/NSOutlineView.m +++ b/Source/NSOutlineView.m @@ -1714,10 +1714,10 @@ Also returns the child index relative to this parent. */ - (void) _didChangeSortDescriptors: (NSArray *)oldSortDescriptors { - if ([_delegate + if ([_dataSource respondsToSelector: @selector(outlineView:sortDescriptorsDidChange:)]) { - [_delegate outlineView: self sortDescriptorsDidChange: oldSortDescriptors]; + [_dataSource outlineView: self sortDescriptorsDidChange: oldSortDescriptors]; } } diff --git a/Source/NSTableView.m b/Source/NSTableView.m index 5a50b376f..1adf36a61 100644 --- a/Source/NSTableView.m +++ b/Source/NSTableView.m @@ -6475,10 +6475,10 @@ For a more detailed explanation, -setSortDescriptors:. */ - (void) _didChangeSortDescriptors: (NSArray *)oldSortDescriptors { - if ([_delegate + if ([_dataSource respondsToSelector: @selector(tableView:sortDescriptorsDidChange:)]) { - [_delegate tableView: self sortDescriptorsDidChange: oldSortDescriptors]; + [_dataSource tableView: self sortDescriptorsDidChange: oldSortDescriptors]; } }