Usability improvement: A single click into a cell of an unselected row

of a table view now can change the cell's state even when the table
view allows dragging.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29161 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2009-12-22 23:21:40 +00:00
parent 8bc3ee3cf8
commit f1f4f87395
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2009-12-23 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSTableView.m (-mouseDown:): A single click into a cell
of an unselected row can now change the cell's state even when the
table view allows dragging.
2009-12-22 17:31-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSCell.m: Corrected documentation in GUI to reflect that

View file

@ -3596,6 +3596,7 @@ if (currentRow >= 0 && currentRow < _numberOfRows) \
BOOL mouseBelowView = NO;
BOOL done = NO;
BOOL mouseMoved = NO;
BOOL didTrackCell = NO;
BOOL dragOperationPossible = [self _isDraggingSource];
NSRect visibleRect = [self convertRect: [self visibleRect]
toView: nil];
@ -3687,7 +3688,7 @@ if (currentRow >= 0 && currentRow < _numberOfRows) \
COMPUTE_NEW_SELECTION;
}
if (dragOperationPossible == YES)
if (!didTrackCell && currentRow == _clickedRow)
{
/*
* a dragging operation is still possible so
@ -3773,6 +3774,7 @@ if (currentRow >= 0 && currentRow < _numberOfRows) \
[self _trackCellAtColumn: _clickedColumn
row: _clickedRow
withEvent: theEvent];
didTrackCell = NO;
if ([[cell class] prefersTrackingUntilMouseUp])
{