mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
Remove checks for the class/subclass of NSTableView/NSOutlineView, but make the decision about how to render by depending on which delegate method is implemented
This commit is contained in:
parent
3345b5c0de
commit
3c01238988
1 changed files with 5 additions and 5 deletions
|
@ -3661,13 +3661,13 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
|
|||
}
|
||||
|
||||
// Check the delegate method...
|
||||
if ([v isKindOfClass: [NSOutlineView class]])
|
||||
hasMethod = [delegate respondsToSelector: @selector(outlineView:viewForTableColumn:item:)];
|
||||
if (hasMethod)
|
||||
{
|
||||
ov = (NSOutlineView *)v;
|
||||
outlineTableColumn = [ov outlineTableColumn];
|
||||
hasMethod = [delegate respondsToSelector: @selector(outlineView:viewForTableColumn:item:)];
|
||||
}
|
||||
else if ([v isKindOfClass: [NSTableView class]])
|
||||
else
|
||||
{
|
||||
hasMethod = [delegate respondsToSelector: @selector(tableView:viewForTableColumn:row:)];
|
||||
}
|
||||
|
@ -3707,7 +3707,7 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
|
|||
NSMapTable *views = [v _pathsToViews];
|
||||
NSView *view = [paths objectForKey: path];
|
||||
|
||||
if ([v isKindOfClass: [NSOutlineView class]])
|
||||
if (ov != nil)
|
||||
{
|
||||
id item = [ov itemAtRow: rowIndex];
|
||||
CGFloat indentationPerLevel = [ov indentationPerLevel];
|
||||
|
@ -3789,7 +3789,7 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
|
|||
[ov addSubview: view];
|
||||
}
|
||||
}
|
||||
else if ([v isKindOfClass: [NSTableView class]])
|
||||
else
|
||||
{
|
||||
// If the view has been stored use it, if not
|
||||
// then grab it.
|
||||
|
|
Loading…
Reference in a new issue