mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 12:00:45 +00:00
Correct minor theme drawing issues, fix issue pointed out by @fredkiefer to address out of order row fetching
This commit is contained in:
parent
77bf2f823b
commit
f9b89c41e6
3 changed files with 9 additions and 10 deletions
|
@ -206,7 +206,7 @@ APPKIT_EXPORT_CLASS
|
|||
NSMutableDictionary *_registeredViews;
|
||||
|
||||
/* NSTableRowView support */
|
||||
NSMutableArray *_rowViews;
|
||||
NSMutableDictionary *_rowViews;
|
||||
}
|
||||
|
||||
/* Data Source */
|
||||
|
|
|
@ -3677,8 +3677,8 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
|
|||
}
|
||||
|
||||
// Create the view if needed...
|
||||
if ([[rowView subviews] containsObject: view] == NO
|
||||
&& view != nil)
|
||||
if (view != nil &&
|
||||
[[rowView subviews] containsObject: view] == NO)
|
||||
{
|
||||
// Add the view to the row...
|
||||
[rowView addSubview: view];
|
||||
|
|
|
@ -2057,7 +2057,7 @@ static void computeNewSelection
|
|||
_pathsToViews = RETAIN([NSMapTable weakToStrongObjectsMapTable]);
|
||||
_registeredNibs = [[NSMutableDictionary alloc] init];
|
||||
_registeredViews = [[NSMutableDictionary alloc] init];
|
||||
_rowViews = [[NSMutableArray alloc] init];
|
||||
_rowViews = [[NSMutableDictionary alloc] init];
|
||||
}
|
||||
|
||||
- (id) initWithFrame: (NSRect)frameRect
|
||||
|
@ -6969,11 +6969,9 @@ For a more detailed explanation, -setSortDescriptors:. */
|
|||
|
||||
if (_viewBased == YES)
|
||||
{
|
||||
if (row < [_rowViews count])
|
||||
{
|
||||
rv = [_rowViews objectAtIndex: row];
|
||||
}
|
||||
NSNumber *aRow = [NSNumber numberWithInteger: row];
|
||||
|
||||
rv = [_rowViews objectForKey: aRow];
|
||||
if (rv == nil)
|
||||
{
|
||||
if (flag == YES)
|
||||
|
@ -6984,11 +6982,12 @@ For a more detailed explanation, -setSortDescriptors:. */
|
|||
}
|
||||
if (rv == nil)
|
||||
{
|
||||
rv = [[NSTableRowView alloc] init];
|
||||
rv = AUTORELEASE([[NSTableRowView alloc] init]);
|
||||
}
|
||||
}
|
||||
|
||||
[_rowViews addObject: rv];
|
||||
[_rowViews setObject: rv
|
||||
forKey: aRow];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue