mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:00:37 +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
9d999d0f79
commit
cd86476602
2 changed files with 12 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue