From a4ca53d72ec1172d685f5ecde47a438dc1251b29 Mon Sep 17 00:00:00 2001 From: gcasa Date: Sat, 13 Dec 2008 00:32:24 +0000 Subject: [PATCH] * Source/NSOutlineView.m: Added change suggested by Doug in bug #25078. This should fix the problem in SVN. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27285 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSOutlineView.m | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3515f5c67..f778cea0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-12 19:36-EST Gregory John Casamento + + * Source/NSOutlineView.m: Added change suggested by Doug in + bug #25078. This should fix the problem in SVN. + 2008-12-12 Fred Kiefer * Source/NSBrowser.m (-drawTitle:inRect:ofColumn:, -dealloc): diff --git a/Source/NSOutlineView.m b/Source/NSOutlineView.m index 115091e61..127613567 100644 --- a/Source/NSOutlineView.m +++ b/Source/NSOutlineView.m @@ -1711,12 +1711,19 @@ static NSImage *unexpandable = nil; - (void) _loadDictionaryStartingWith: (id) startitem atLevel: (int) level { - int num = [_dataSource outlineView: self - numberOfChildrenOfItem: startitem]; + int num = 0; int i = 0; id sitem = (startitem == nil) ? (id)[NSNull null] : (id)startitem; NSMutableArray *anarray = nil; + // Check to see if item is expandable before getting the number of + // items. + if([_dataSource outlineView: self isItemExpandable: startitem]) + { + num = [_dataSource outlineView: self + numberOfChildrenOfItem: startitem]; + } + if (num > 0) { anarray = [NSMutableArray array];