mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 03:10:59 +00:00
Minor indentation cleanup.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23932 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f4cd637e0d
commit
c687a15b00
1 changed files with 47 additions and 47 deletions
|
@ -3477,60 +3477,60 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
// Prepare the cell
|
// Prepare the cell
|
||||||
if (_clickedRow != -1)
|
if (_clickedRow != -1)
|
||||||
{
|
{
|
||||||
tb = [_tableColumns objectAtIndex: _clickedColumn];
|
tb = [_tableColumns objectAtIndex: _clickedColumn];
|
||||||
/* we should copy the cell here, as we do on editing.
|
/* we should copy the cell here, as we do on editing.
|
||||||
otherwise validation on a cell being edited could
|
otherwise validation on a cell being edited could
|
||||||
cause the cell we are selecting to get it's objectValue */
|
cause the cell we are selecting to get it's objectValue */
|
||||||
cell = [[tb dataCellForRow: _clickedRow] copy];
|
cell = [[tb dataCellForRow: _clickedRow] copy];
|
||||||
originalValue = RETAIN([self _objectValueForTableColumn:tb row:_clickedRow]);
|
originalValue = RETAIN([self _objectValueForTableColumn:tb row:_clickedRow]);
|
||||||
[cell setObjectValue: originalValue];
|
[cell setObjectValue: originalValue];
|
||||||
cellFrame = [self frameOfCellAtColumn: _clickedColumn
|
cellFrame = [self frameOfCellAtColumn: _clickedColumn
|
||||||
row: _clickedRow];
|
row: _clickedRow];
|
||||||
[cell setHighlighted: YES];
|
[cell setHighlighted: YES];
|
||||||
[self setNeedsDisplayInRect: cellFrame];
|
[self setNeedsDisplayInRect: cellFrame];
|
||||||
/* give delegate a chance to i.e set target */
|
/* give delegate a chance to i.e set target */
|
||||||
[self _willDisplayCell: cell
|
[self _willDisplayCell: cell
|
||||||
forTableColumn: tb
|
forTableColumn: tb
|
||||||
row: _clickedRow];
|
row: _clickedRow];
|
||||||
if ([cell trackMouse: lastEvent
|
if ([cell trackMouse: lastEvent
|
||||||
inRect: cellFrame
|
inRect: cellFrame
|
||||||
ofView: self
|
ofView: self
|
||||||
untilMouseUp: [[cell class] prefersTrackingUntilMouseUp]])
|
untilMouseUp: [[cell class] prefersTrackingUntilMouseUp]])
|
||||||
{
|
|
||||||
id newValue = [cell objectValue];
|
|
||||||
|
|
||||||
if ([tb isEditable] && originalValue != newValue
|
|
||||||
&& ![originalValue isEqual: newValue])
|
|
||||||
{
|
{
|
||||||
[self _setObjectValue: newValue
|
id newValue = [cell objectValue];
|
||||||
forTableColumn: tb
|
|
||||||
row: _clickedRow];
|
if ([tb isEditable] && originalValue != newValue
|
||||||
|
&& ![originalValue isEqual: newValue])
|
||||||
|
{
|
||||||
|
[self _setObjectValue: newValue
|
||||||
|
forTableColumn: tb
|
||||||
|
row: _clickedRow];
|
||||||
|
}
|
||||||
|
done = YES;
|
||||||
|
currentRow = _clickedRow;
|
||||||
|
computeNewSelection(self,
|
||||||
|
oldSelectedRows,
|
||||||
|
_selectedRows,
|
||||||
|
originalRow,
|
||||||
|
oldRow,
|
||||||
|
currentRow,
|
||||||
|
&_selectedRow,
|
||||||
|
selectionMode);
|
||||||
}
|
}
|
||||||
done = YES;
|
RELEASE(originalValue);
|
||||||
currentRow = _clickedRow;
|
[cell setHighlighted: NO];
|
||||||
computeNewSelection(self,
|
RELEASE(cell);
|
||||||
oldSelectedRows,
|
[self setNeedsDisplayInRect: cellFrame];
|
||||||
_selectedRows,
|
lastEvent = [NSApp currentEvent];
|
||||||
originalRow,
|
|
||||||
oldRow,
|
|
||||||
currentRow,
|
|
||||||
&_selectedRow,
|
|
||||||
selectionMode);
|
|
||||||
}
|
|
||||||
RELEASE(originalValue);
|
|
||||||
[cell setHighlighted: NO];
|
|
||||||
RELEASE(cell);
|
|
||||||
[self setNeedsDisplayInRect: cellFrame];
|
|
||||||
lastEvent = [NSApp currentEvent];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (done != YES)
|
while (done != YES)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Wrap each iteration in an autorelease pool. Otherwise, we end
|
Wrap each iteration in an autorelease pool. Otherwise, we end
|
||||||
up allocating huge amounts of objects if the button is held
|
up allocating huge amounts of objects if the button is held
|
||||||
down for a long time.
|
down for a long time.
|
||||||
*/
|
*/
|
||||||
CREATE_AUTORELEASE_POOL(arp);
|
CREATE_AUTORELEASE_POOL(arp);
|
||||||
BOOL shouldComputeNewSelection = NO;
|
BOOL shouldComputeNewSelection = NO;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue