* Source/NSTableView.m: Use new method -_isCellSelectableColumn:row:,

that checks the cells selectable state, in -mouseDown:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36363 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2013-03-15 16:39:31 +00:00
parent b9cd78229f
commit 6b09581658
2 changed files with 25 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2013-03-15 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTableView.m: Use new method -_isCellSelectableColumn:row:,
that checks the cells selectable state, in -mouseDown:.
2013-03-10 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSNibLoading.m (NSCustomView -nibInstantiateWithCoder:):

View file

@ -143,6 +143,8 @@ typedef struct _tableViewFlags
- (BOOL) _isEditableColumn: (int)columnIndex
row: (int)rowIndex;
- (BOOL) _isCellSelectableColumn: (int)columnIndex
row: (int)rowIndex;
- (BOOL) _isCellEditableColumn: (int)columnIndex
row: (int)rowIndex;
- (int) _numRows;
@ -3585,12 +3587,12 @@ static inline float computePeriod(NSPoint mouseLocationWin,
return;
}
if (![self _isEditableColumn: _clickedColumn row: _clickedRow])
if (![self _isCellSelectableColumn: _clickedColumn row: _clickedRow])
{
// Send double-action but don't edit
[self _trackCellAtColumn: _clickedColumn
row: _clickedRow
withEvent: theEvent];
row: _clickedRow
withEvent: theEvent];
if (_clickedRow != -1)
[self sendAction: _doubleAction to: _target];
}
@ -6579,6 +6581,21 @@ For a more detailed explanation, -setSortDescriptors:. */
row: rowIndex];
}
- (BOOL) _isCellSelectableColumn: (int) columnIndex
row: (int) rowIndex
{
if (![self _isEditableColumn: columnIndex row: rowIndex])
{
return NO;
}
else
{
NSCell *cell = [self preparedCellAtColumn: columnIndex row: rowIndex];
return [cell isSelectable];
}
}
- (BOOL) _isCellEditableColumn: (int) columnIndex
row: (int) rowIndex
{