Partially correct implementation

This commit is contained in:
Gregory John Casamento 2024-07-23 13:08:35 -04:00
parent a1dd317d29
commit ffdf8fb6da

View file

@ -3281,15 +3281,14 @@ static BOOL browserUseBezels;
- (void) _performLoadOfItem: (id)item - (void) _performLoadOfItem: (id)item
forColumn: (NSInteger)column forColumn: (NSInteger)column
{ {
NSBrowserColumn *bc; NSBrowserColumn *bc = nil;
NSScrollView *sc; NSScrollView *sc = nil;
NSMatrix *matrix; NSMatrix *matrix = nil;
NSInteger i, rows, cols; NSInteger i = 0, rows = 0, cols = 1;
id child = nil;
// Ask the delegate for the number of rows // Ask the delegate for the number of rows for a given item...
rows = [_browserDelegate browser: self numberOfChildrenOfItem: item]; rows = [_browserDelegate browser: self numberOfChildrenOfItem: item];
cols = 1;
bc = [_browserColumns objectAtIndex: column]; bc = [_browserColumns objectAtIndex: column];
if (!(sc = [bc columnScrollView])) if (!(sc = [bc columnScrollView]))
@ -3341,19 +3340,14 @@ static BOOL browserUseBezels;
} }
[sc setDocumentView: matrix]; [sc setDocumentView: matrix];
// Loading for item based delegate // Iterate over the rows...
{
// Now loop through the cells and load each one
id aCell = nil;
for (i = 0; i < rows; i++) for (i = 0; i < rows; i++)
{ {
aCell = [matrix cellAtRow: i column: 0]; id aCell = [matrix cellAtRow: i column: 0];
if (![aCell isLoaded]) if (![aCell isLoaded])
{ {
BOOL leaf = YES; BOOL leaf = YES;
id val = nil; id val = nil;
id child = nil;
child = [_browserDelegate browser: self child: i ofItem: _lastItemLoaded]; child = [_browserDelegate browser: self child: i ofItem: _lastItemLoaded];
leaf = [_browserDelegate browser: self isLeafItem: child]; leaf = [_browserDelegate browser: self isLeafItem: child];
@ -3361,9 +3355,6 @@ static BOOL browserUseBezels;
[aCell setLeaf: leaf]; [aCell setLeaf: leaf];
[aCell setStringValue: val]; [aCell setStringValue: val];
[aCell setLoaded: YES]; [aCell setLoaded: YES];
_lastItemLoaded = child;
}
} }
} }
@ -3372,6 +3363,7 @@ static BOOL browserUseBezels;
if (column > _lastColumnLoaded) if (column > _lastColumnLoaded)
{ {
_lastColumnLoaded = column; _lastColumnLoaded = column;
_lastItemLoaded = child;
} }
/* Determine the height of a cell in the matrix, and set that as the /* Determine the height of a cell in the matrix, and set that as the