mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Modified the drag code to call -canDragRowsWithIndexes:atPoint: as expected
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29100 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fe1ba4f005
commit
19dad5cba6
2 changed files with 12 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-12-05 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
|
||||
* Source/NSTableView.m (-_startDragOperationWithEvent:): Modified to call
|
||||
-canDragRowsWithIndexes:atPoint: as expected.
|
||||
|
||||
2009-12-05 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
|
||||
* Source/NSOutlineView.m (-draggingUpdated): Further simplified.
|
||||
|
|
|
@ -3440,11 +3440,12 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
|||
|
||||
- (BOOL) _startDragOperationWithEvent: (NSEvent *) theEvent
|
||||
{
|
||||
NSPasteboard *pboard;
|
||||
NSPasteboard *pboard = [NSPasteboard pasteboardWithName: NSDragPboard];
|
||||
NSPoint startPoint = [self convertPoint: [theEvent locationInWindow]
|
||||
fromView: nil];
|
||||
|
||||
pboard = [NSPasteboard pasteboardWithName: NSDragPboard];
|
||||
if ([self _writeRows: _selectedRows
|
||||
toPasteboard: pboard] == YES)
|
||||
if ([self canDragRowsWithIndexes: _selectedRows atPoint: startPoint]
|
||||
&& [self _writeRows: _selectedRows toPasteboard: pboard])
|
||||
{
|
||||
NSPoint p = NSZeroPoint;
|
||||
NSImage *dragImage;
|
||||
|
@ -3468,12 +3469,12 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
|||
s.height = p.y + s.height/2; // View is flipped
|
||||
|
||||
/*
|
||||
* Find the current mouse location and adjust
|
||||
* Reuse the current mouse location and adjust
|
||||
* it to determine the location of the bottom
|
||||
* left corner of the image in this view's
|
||||
* coordinate system.
|
||||
*/
|
||||
p = [self convertPoint: [theEvent locationInWindow] fromView: nil];
|
||||
p = startPoint;
|
||||
p.x += s.width;
|
||||
p.y += s.height;
|
||||
|
||||
|
|
Loading…
Reference in a new issue