From f79203f5d57aaa0e0fb99d5e019b53130b15bc69 Mon Sep 17 00:00:00 2001 From: Brian Donovan Date: Mon, 11 Apr 2011 15:00:20 -0700 Subject: [PATCH] Fix feedback view when retargeting the drop row & operation. CPTableView was inappropriately preserving the retargeted drop row & operation as the drag operation continued, causing the data source call to - tableView:validateDrop:proposedRow:proposedDropOperation: to echo any row and operation set by the first call to -setDropRow:dropOperation:, making it impossible for the data source to determine new values for -setDropRow:dropOperation:, making the feedback view stay in the same place it was initially drawn. --- AppKit/CPTableView.j | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 935ac814a..777124b60 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -4327,6 +4327,9 @@ Your delegate can implement this method to avoid subclassing the tableview to ad */ - (CPDragOperation)draggingUpdated:(id)sender { + _retargetedDropRow = nil; + _retargetedDropOperation = nil; + var location = [self convertPoint:[sender draggingLocation] fromView:nil], dropOperation = [self _proposedDropOperationAtPoint:location], numberOfRows = [self numberOfRows], @@ -4335,6 +4338,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad if (_retargetedDropRow !== nil) row = _retargetedDropRow; + if (_retargetedDropOperation !== nil) + dropOperation = _retargetedDropOperation; if (dropOperation === CPTableViewDropOn && row >= numberOfRows)