mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 18:40:47 +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
|
@ -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>
|
2009-12-05 Quentin Mathe <quentin.mathe@gmail.com>
|
||||||
|
|
||||||
* Source/NSOutlineView.m (-draggingUpdated): Further simplified.
|
* Source/NSOutlineView.m (-draggingUpdated): Further simplified.
|
||||||
|
|
|
@ -3440,11 +3440,12 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
|
|
||||||
- (BOOL) _startDragOperationWithEvent: (NSEvent *) theEvent
|
- (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 canDragRowsWithIndexes: _selectedRows atPoint: startPoint]
|
||||||
if ([self _writeRows: _selectedRows
|
&& [self _writeRows: _selectedRows toPasteboard: pboard])
|
||||||
toPasteboard: pboard] == YES)
|
|
||||||
{
|
{
|
||||||
NSPoint p = NSZeroPoint;
|
NSPoint p = NSZeroPoint;
|
||||||
NSImage *dragImage;
|
NSImage *dragImage;
|
||||||
|
@ -3468,12 +3469,12 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
s.height = p.y + s.height/2; // View is flipped
|
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
|
* it to determine the location of the bottom
|
||||||
* left corner of the image in this view's
|
* left corner of the image in this view's
|
||||||
* coordinate system.
|
* coordinate system.
|
||||||
*/
|
*/
|
||||||
p = [self convertPoint: [theEvent locationInWindow] fromView: nil];
|
p = startPoint;
|
||||||
p.x += s.width;
|
p.x += s.width;
|
||||||
p.y += s.height;
|
p.y += s.height;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue