Corrections to the outline view and the table view.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14148 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2002-07-14 23:44:48 +00:00
parent 7c67f5f344
commit 374d957711
3 changed files with 39 additions and 22 deletions

View file

@ -1125,7 +1125,6 @@ static NSImage *unexpandable = nil;
row: (int) rowIndex
{
id item = [self itemAtRow: rowIndex];
if ([_delegate respondsToSelector:
@selector(outlineView:shouldEditTableColumn:item:)])
{
@ -1582,6 +1581,7 @@ static NSImage *unexpandable = nil;
// of editing.
if (_dataSource_editable == NO)
{
NSLog(@"Data source not editable...");
return;
}
@ -1677,29 +1677,34 @@ static NSImage *unexpandable = nil;
image = unexpandable;
}
// move the drawing rect over like in the drawRow routine...
level = [self levelForItem: item];
indentationFactor = _indentationPerLevel * level;
drawingRect = [self frameOfCellAtColumn: columnIndex row: rowIndex];
drawingRect.origin.x += indentationFactor + 5 + [image size].width;
drawingRect.size.width -= indentationFactor + 5 + [image size].width;
// create the image cell..
imageCell = [[NSCell alloc] initImageCell: image];
if(_indentationMarkerFollowsCell)
if(tb == [self outlineTableColumn])
{
imageRect.origin.x = drawingRect.origin.x + indentationFactor;
imageRect.origin.y = drawingRect.origin.y;
level = [self levelForItem: item];
indentationFactor = _indentationPerLevel * level;
drawingRect.origin.x += indentationFactor + 5 + [image size].width;
drawingRect.size.width -= indentationFactor + 5 + [image size].width;
// create the image cell..
imageCell = [[NSCell alloc] initImageCell: image];
if(_indentationMarkerFollowsCell)
{
imageRect.origin.x = drawingRect.origin.x + indentationFactor;
imageRect.origin.y = drawingRect.origin.y;
}
else
{
imageRect.origin.x = drawingRect.origin.x;
imageRect.origin.y = drawingRect.origin.y;
}
// draw...
imageRect.size.width = [image size].width;
imageRect.size.height = [image size].height;
[imageCell drawWithFrame: imageRect inView: self];
}
else
{
imageRect.origin.x = drawingRect.origin.x;
imageRect.origin.y = drawingRect.origin.y;
}
// draw...
imageRect.size.width = [image size].width;
imageRect.size.height = [image size].height;
[imageCell drawWithFrame: imageRect inView: self];
if (flag)
{
[_editedCell selectWithFrame: drawingRect