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:
gcasa 2006-10-21 15:41:51 +00:00
parent ae51b2739d
commit 4489ce7651

View file

@ -3477,64 +3477,64 @@ static inline float computePeriod(NSPoint mouseLocationWin,
// Prepare the cell
if (_clickedRow != -1)
{
tb = [_tableColumns objectAtIndex: _clickedColumn];
/* we should copy the cell here, as we do on editing.
otherwise validation on a cell being edited could
cause the cell we are selecting to get it's objectValue */
cell = [[tb dataCellForRow: _clickedRow] copy];
originalValue = RETAIN([self _objectValueForTableColumn:tb row:_clickedRow]);
[cell setObjectValue: originalValue];
cellFrame = [self frameOfCellAtColumn: _clickedColumn
tb = [_tableColumns objectAtIndex: _clickedColumn];
/* we should copy the cell here, as we do on editing.
otherwise validation on a cell being edited could
cause the cell we are selecting to get it's objectValue */
cell = [[tb dataCellForRow: _clickedRow] copy];
originalValue = RETAIN([self _objectValueForTableColumn:tb row:_clickedRow]);
[cell setObjectValue: originalValue];
cellFrame = [self frameOfCellAtColumn: _clickedColumn
row: _clickedRow];
[cell setHighlighted: YES];
[self setNeedsDisplayInRect: cellFrame];
/* give delegate a chance to i.e set target */
[self _willDisplayCell: cell
forTableColumn: tb
row: _clickedRow];
if ([cell trackMouse: lastEvent
[cell setHighlighted: YES];
[self setNeedsDisplayInRect: cellFrame];
/* give delegate a chance to i.e set target */
[self _willDisplayCell: cell
forTableColumn: tb
row: _clickedRow];
if ([cell trackMouse: lastEvent
inRect: cellFrame
ofView: self
untilMouseUp: [[cell class] prefersTrackingUntilMouseUp]])
{
id newValue = [cell objectValue];
if ([tb isEditable] && originalValue != newValue
&& ![originalValue isEqual: newValue])
untilMouseUp: [[cell class] prefersTrackingUntilMouseUp]])
{
[self _setObjectValue: newValue
forTableColumn: tb
row: _clickedRow];
}
done = YES;
currentRow = _clickedRow;
computeNewSelection(self,
oldSelectedRows,
_selectedRows,
originalRow,
oldRow,
currentRow,
&_selectedRow,
selectionMode);
}
RELEASE(originalValue);
[cell setHighlighted: NO];
RELEASE(cell);
[self setNeedsDisplayInRect: cellFrame];
lastEvent = [NSApp currentEvent];
id newValue = [cell objectValue];
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);
}
RELEASE(originalValue);
[cell setHighlighted: NO];
RELEASE(cell);
[self setNeedsDisplayInRect: cellFrame];
lastEvent = [NSApp currentEvent];
}
}
while (done != YES)
{
/*
Wrap each iteration in an autorelease pool. Otherwise, we end
up allocating huge amounts of objects if the button is held
down for a long time.
Wrap each iteration in an autorelease pool. Otherwise, we end
up allocating huge amounts of objects if the button is held
down for a long time.
*/
CREATE_AUTORELEASE_POOL(arp);
BOOL shouldComputeNewSelection = NO;
switch ([lastEvent type])
{
case NSLeftMouseUp:
@ -4016,7 +4016,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
- (void) setFrame: (NSRect)frameRect
{
NSRect tmpRect = frameRect;
if ([_super_view respondsToSelector:@selector(documentRect)])
{
NSRect docRect = [(NSClipView *)_super_view documentRect];