mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Better detection of drag operation for NSOutlineView.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18581 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4237cbd996
commit
b6d77843a3
2 changed files with 13 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-02-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSOutlineView.m: (-draggingUpdated:) Applied patch from
|
||||
Andreas Heppel (andreas.heppel@sysgo.com) to determine drag
|
||||
operation correctly.
|
||||
|
||||
2004-02-11 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSMatrix.m: (-setBackgroundColor:,
|
||||
|
|
|
@ -1364,7 +1364,8 @@ static NSImage *unexpandable = nil;
|
|||
int levelBefore;
|
||||
int levelAfter;
|
||||
int level;
|
||||
|
||||
NSDragOperation dragOperation = [sender draggingSourceOperationMask];
|
||||
|
||||
p = [self convertPoint: p fromView: nil];
|
||||
verticalQuarterPosition =
|
||||
(p.y - _bounds.origin.y) / _rowHeight * 4.;
|
||||
|
@ -1465,14 +1466,10 @@ static NSImage *unexpandable = nil;
|
|||
if ([_dataSource respondsToSelector:
|
||||
@selector(outlineView:validateDrop:proposedItem:proposedChildIndex:)])
|
||||
{
|
||||
//NSLog(@"currentDropLevel %d, currentDropRow %d",
|
||||
//currentDropLevel, currentDropRow);
|
||||
[_dataSource outlineView: self
|
||||
validateDrop: sender
|
||||
proposedItem: item
|
||||
proposedChildIndex: childIndex];
|
||||
//NSLog(@"currentDropLevel %d, currentDropRow %d",
|
||||
//currentDropLevel, currentDropRow);
|
||||
dragOperation = [_dataSource outlineView: self
|
||||
validateDrop: sender
|
||||
proposedItem: item
|
||||
proposedChildIndex: childIndex];
|
||||
}
|
||||
|
||||
if ((currentDropRow != oldDropRow) || (currentDropLevel != oldDropLevel))
|
||||
|
@ -1561,7 +1558,7 @@ static NSImage *unexpandable = nil;
|
|||
}
|
||||
|
||||
|
||||
return NSDragOperationCopy;
|
||||
return dragOperation;
|
||||
}
|
||||
|
||||
- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender
|
||||
|
|
Loading…
Reference in a new issue