mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-07 11:17:12 +00:00
Merge pull request #1943 from Dogild/EmptyTableView
Fixed: selection in a tableView without column
This commit is contained in:
@@ -1275,7 +1275,8 @@ NOT YET IMPLEMENTED
|
||||
- (void)selectRowIndexes:(CPIndexSet)rows byExtendingSelection:(BOOL)shouldExtendSelection
|
||||
{
|
||||
if ([rows isEqualToIndexSet:_selectedRowIndexes] ||
|
||||
(([rows firstIndex] != CPNotFound && [rows firstIndex] < 0) || [rows lastIndex] >= [self numberOfRows]))
|
||||
(([rows firstIndex] != CPNotFound && [rows firstIndex] < 0) || [rows lastIndex] >= [self numberOfRows]) ||
|
||||
[self numberOfColumns] <= 0)
|
||||
return;
|
||||
|
||||
// We deselect all columns when selecting rows.
|
||||
@@ -3073,7 +3074,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
*/
|
||||
- (BOOL)canDragRowsWithIndexes:(CPIndexSet)rowIndexes atPoint:(CGPoint)mouseDownPoint
|
||||
{
|
||||
return [rowIndexes count] > 0 && [self numberOfRows] > 0;
|
||||
return [rowIndexes count] > 0 && [self numberOfRows] > 0 && [self numberOfColumns] > 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user