mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 13:20:47 +00:00
Move check for dataSource or binding into NSOutlineView before calling method to draw the row per discussion with @fredkiefer
This commit is contained in:
parent
3d59afd2c9
commit
abfc782a6c
2 changed files with 10 additions and 9 deletions
|
@ -3534,15 +3534,6 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
|
|||
NSInteger i;
|
||||
id dataSource = [outlineView dataSource];
|
||||
NSTableColumn *outlineTableColumn = [outlineView outlineTableColumn];
|
||||
GSKeyValueBinding *theBinding = nil;
|
||||
|
||||
theBinding = [GSKeyValueBinding getBinding: NSContentBinding
|
||||
forObject: outlineView];
|
||||
|
||||
if (dataSource == nil && theBinding == nil)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Using columnAtPoint: here would make it called twice per row per drawn
|
||||
rect - so we avoid it and do it natively */
|
||||
|
|
|
@ -1032,6 +1032,16 @@ static NSImage *unexpandable = nil;
|
|||
*/
|
||||
- (void) drawRow: (NSInteger)rowIndex clipRect: (NSRect)aRect
|
||||
{
|
||||
GSKeyValueBinding *theBinding = nil;
|
||||
|
||||
theBinding = [GSKeyValueBinding getBinding: NSContentBinding
|
||||
forObject: self];
|
||||
|
||||
if (_dataSource == nil && theBinding == nil)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_viewBased)
|
||||
{
|
||||
[self _drawCellViewRow: rowIndex
|
||||
|
|
Loading…
Reference in a new issue