mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-25 20:00:42 +00:00
Additional fixes for drag and drop in the TableView after OutlineView merge.
This commit is contained in:
+11
-3
@@ -2640,6 +2640,9 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
// The delegate disallowed the drag so clear the dragged row indexes
|
||||
_draggedRowIndexes = [CPIndexSet indexSet];
|
||||
}
|
||||
else if (ABS(_startTrackingPoint.x - aPoint.x) < 5 && ABS(_startTrackingPoint.y - aPoint.y) < 5)
|
||||
return YES;
|
||||
@@ -2735,7 +2738,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
var location = [self convertPoint:[sender draggingLocation] fromView:nil],
|
||||
dropOperation = [self _proposedDropOperationAtPoint:location],
|
||||
row = [self _proposedRowAtPoint:location];
|
||||
|
||||
|
||||
if(_retargetedDropRow !== nil)
|
||||
row = _retargetedDropRow;
|
||||
|
||||
@@ -2868,6 +2871,10 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
if(_retargetedDropRow !== nil)
|
||||
row = _retargetedDropRow;
|
||||
|
||||
|
||||
if (dropOperation === CPTableViewDropOn && row >= [self numberOfRows])
|
||||
row = [self numberOfRows] - 1;
|
||||
|
||||
var rect = CPRectMakeZero();
|
||||
|
||||
if (row === -1)
|
||||
@@ -3339,8 +3346,9 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey",
|
||||
else if (dropOperation === CPTableViewDropOn)
|
||||
{
|
||||
//if row is selected don't fill and stroke white
|
||||
var selectedRows = [tableView selectedRowIndexes];
|
||||
var newRect = _CGRectMake(aRect.origin.x + 2, aRect.origin.y + 2, aRect.size.width - 4, aRect.size.height - 5);
|
||||
var selectedRows = [tableView selectedRowIndexes],
|
||||
newRect = _CGRectMake(aRect.origin.x + 2, aRect.origin.y + 2, aRect.size.width - 4, aRect.size.height - 5);
|
||||
|
||||
if([selectedRows containsIndex:currentRow])
|
||||
{
|
||||
CGContextSetLineWidth(context, 2);
|
||||
|
||||
Reference in New Issue
Block a user