mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:20:38 +00:00
Fix various issues when drawing controls with edited cells. This
includes a fix for the problem of properly resizing and redrawing the editor when the cell is resized or moved during editing (bug #22678). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29133 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
82aee08d88
commit
68b0f819f2
7 changed files with 243 additions and 149 deletions
|
@ -2178,6 +2178,16 @@ static void computeNewSelection
|
|||
[_selectedColumns addIndex: newIndex];
|
||||
}
|
||||
|
||||
/* Update edited cell */
|
||||
if (_editedColumn == columnIndex)
|
||||
{
|
||||
_editedColumn = newIndex;
|
||||
}
|
||||
else if ((_editedColumn >= minRange) && (_editedColumn <= maxRange))
|
||||
{
|
||||
_editedColumn += shift;
|
||||
}
|
||||
|
||||
/* Now really move the column */
|
||||
if (columnIndex < newIndex)
|
||||
{
|
||||
|
@ -4948,20 +4958,21 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
|||
/* Draw the row between startingColumn and endingColumn */
|
||||
for (i = startingColumn; i <= endingColumn; i++)
|
||||
{
|
||||
if (i != _editedColumn || rowIndex != _editedRow)
|
||||
{
|
||||
tb = [_tableColumns objectAtIndex: i];
|
||||
cell = [tb dataCellForRow: rowIndex];
|
||||
[self _willDisplayCell: cell
|
||||
forTableColumn: tb
|
||||
row: rowIndex];
|
||||
[cell setObjectValue: [_dataSource tableView: self
|
||||
objectValueForTableColumn: tb
|
||||
row: rowIndex]];
|
||||
drawingRect = [self frameOfCellAtColumn: i
|
||||
row: rowIndex];
|
||||
[cell drawWithFrame: drawingRect inView: self];
|
||||
}
|
||||
tb = [_tableColumns objectAtIndex: i];
|
||||
cell = [tb dataCellForRow: rowIndex];
|
||||
if (i == _editedColumn && rowIndex == _editedRow)
|
||||
[cell _setInEditing: YES];
|
||||
[self _willDisplayCell: cell
|
||||
forTableColumn: tb
|
||||
row: rowIndex];
|
||||
[cell setObjectValue: [_dataSource tableView: self
|
||||
objectValueForTableColumn: tb
|
||||
row: rowIndex]];
|
||||
drawingRect = [self frameOfCellAtColumn: i
|
||||
row: rowIndex];
|
||||
[cell drawWithFrame: drawingRect inView: self];
|
||||
if (i == _editedColumn && rowIndex == _editedRow)
|
||||
[cell _setInEditing: NO];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue