Don't update the drop row and operation if the drop target hasn't changed (this prevents to overwrite a custom drop row and operation set by the user)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36169 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Quentin Mathe 2013-02-19 16:03:28 +00:00
parent f896752208
commit da5449b7a8
2 changed files with 11 additions and 3 deletions

View file

@ -1,7 +1,14 @@
2013-02-19 Quentin Mathe <quentin.mathe@gmail.com>
* Source/NSTableView.m (-draggingUpdated:): Extracted drop indicator drawing
into a new method -_drawDropIndicator.
* Source/NSTableView.m (-draggingUpdated:): Don't update the drop row and
operation if the drop target hasn't changed (this prevents to overwrite a
custom drop row and operation set by the user in
-tableView:handleValidateDrop:proposedRow:proposedOperation:).
2013-02-19 Quentin Mathe <quentin.mathe@gmail.com>
* Source/NSTableView.m (-draggingUpdated:): Extracted drop indicator
drawing into a new method -_drawDropIndicator.
2013-02-19 Quentin Mathe <quentin.mathe@gmail.com>

View file

@ -6336,7 +6336,6 @@ view to drag. */
&& currentDragOperation == dragOperation);
[self _scrollRowAtPointToVisible: p];
[self _setDropOperationAndRow: row usingPositionInRow: positionInRow atPoint: p];
if (isSameDropTargetThanBefore)
return currentDragOperation;
@ -6344,6 +6343,8 @@ view to drag. */
currentDragOperation = dragOperation;
lastQuarterPosition = quarterPosition;
[self _setDropOperationAndRow: row usingPositionInRow: positionInRow atPoint: p];
if ([_dataSource respondsToSelector:
@selector(tableView:validateDrop:proposedRow:proposedDropOperation:)])
{