mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:00:48 +00:00
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:
parent
7c67f5f344
commit
374d957711
3 changed files with 39 additions and 22 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2002-07-14 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* Source/NSTableView.m:
|
||||||
|
[-NSTableView _editNextEditableCellAfterRow:column:] corrected
|
||||||
|
a problem with the loop which seeks the next editable cell. It
|
||||||
|
was using incorrect values in the call to isCellEditable in the
|
||||||
|
second for which was causing an exception to be thrown.
|
||||||
|
* Source/NSOutlineView.m: ([-editColumn:row:withEvent:select:])
|
||||||
|
corrected a problem in this method which was causing the cell
|
||||||
|
to be drawn incorrectly when editing a column other than the
|
||||||
|
outline column.
|
||||||
|
|
||||||
Fri Jul 12 12:55:17 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
Fri Jul 12 12:55:17 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
Patch from Benhur Stein <benhur-gnustep@inf.ufsm.br>:
|
Patch from Benhur Stein <benhur-gnustep@inf.ufsm.br>:
|
||||||
|
|
|
@ -1125,7 +1125,6 @@ static NSImage *unexpandable = nil;
|
||||||
row: (int) rowIndex
|
row: (int) rowIndex
|
||||||
{
|
{
|
||||||
id item = [self itemAtRow: rowIndex];
|
id item = [self itemAtRow: rowIndex];
|
||||||
|
|
||||||
if ([_delegate respondsToSelector:
|
if ([_delegate respondsToSelector:
|
||||||
@selector(outlineView:shouldEditTableColumn:item:)])
|
@selector(outlineView:shouldEditTableColumn:item:)])
|
||||||
{
|
{
|
||||||
|
@ -1582,6 +1581,7 @@ static NSImage *unexpandable = nil;
|
||||||
// of editing.
|
// of editing.
|
||||||
if (_dataSource_editable == NO)
|
if (_dataSource_editable == NO)
|
||||||
{
|
{
|
||||||
|
NSLog(@"Data source not editable...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1677,29 +1677,34 @@ static NSImage *unexpandable = nil;
|
||||||
image = unexpandable;
|
image = unexpandable;
|
||||||
}
|
}
|
||||||
// move the drawing rect over like in the drawRow routine...
|
// move the drawing rect over like in the drawRow routine...
|
||||||
level = [self levelForItem: item];
|
|
||||||
indentationFactor = _indentationPerLevel * level;
|
|
||||||
drawingRect = [self frameOfCellAtColumn: columnIndex row: rowIndex];
|
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..
|
if(tb == [self outlineTableColumn])
|
||||||
imageCell = [[NSCell alloc] initImageCell: image];
|
|
||||||
if(_indentationMarkerFollowsCell)
|
|
||||||
{
|
{
|
||||||
imageRect.origin.x = drawingRect.origin.x + indentationFactor;
|
level = [self levelForItem: item];
|
||||||
imageRect.origin.y = drawingRect.origin.y;
|
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)
|
if (flag)
|
||||||
{
|
{
|
||||||
[_editedCell selectWithFrame: drawingRect
|
[_editedCell selectWithFrame: drawingRect
|
||||||
|
|
|
@ -2729,7 +2729,6 @@ _isCellEditable (id delegate, NSArray *tableColumns,
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
NSTableColumn *tb;
|
NSTableColumn *tb;
|
||||||
|
|
||||||
tb = [tableColumns objectAtIndex: column];
|
tb = [tableColumns objectAtIndex: column];
|
||||||
if ([tableView _shouldEditTableColumn: tb
|
if ([tableView _shouldEditTableColumn: tb
|
||||||
row: row] == NO)
|
row: row] == NO)
|
||||||
|
@ -6588,6 +6587,7 @@ byExtendingSelection: (BOOL)flag
|
||||||
column: (int)column
|
column: (int)column
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (row > -1)
|
if (row > -1)
|
||||||
{
|
{
|
||||||
// First look for cells in the same row
|
// First look for cells in the same row
|
||||||
|
@ -6605,7 +6605,7 @@ byExtendingSelection: (BOOL)flag
|
||||||
{
|
{
|
||||||
for (j = 0; j < _numberOfColumns; j++)
|
for (j = 0; j < _numberOfColumns; j++)
|
||||||
{
|
{
|
||||||
if (_isCellEditable (_delegate, _tableColumns, self, row, i) == YES)
|
if (_isCellEditable (_delegate, _tableColumns, self, i, j) == YES)
|
||||||
{
|
{
|
||||||
[self editColumn: j row: i withEvent: nil select: YES];
|
[self editColumn: j row: i withEvent: nil select: YES];
|
||||||
return YES;
|
return YES;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue