Bug 4815 - Tree DND with scrolling drops in wrong place (1GJKYMD)
Summary: Tree DND with scrolling drops in wrong place (1GJKYMD)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Veronika Irvine CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:23 EDT by Veronika Irvine CLA
Modified: 2006-04-24 16:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Veronika Irvine CLA 2001-10-11 14:23:28 EDT
From Ryan Manwiller on eclipse corner:

The item is dropped in the wrong place if the original item dragged has been
scrolled out of view. The problem is that when the item is dropped, the tree
is first scrolled to show the original item, then the item is dropped on the
current item under the mouse pointer (which is now wrong).

This is obstructing our use of SWT tree with drag-n-drop. I'm hoping this
can be fixed at the SWT Tree instead of having to implement some workaround
(does anyone know of any?). Thanks.

You can see this behavior with the SWT FileViewer example.

1. Create enough directories under temp, so that you can drag and drop one
to another and cause scrolling. Say, a, b, c, d, ..etc...
2. Size the FileViewer to ensure scrolling will occur and the top item will
be out of view.
3. Using the FileViewer example, drap the top directory (a) downward until
(a) is out of view.
4. Drop the item.
5. Notice that the Tree shows (a) before actually dropping the item, thus
the item is dropped in the wrong place.

NOTES:

VI (12/09/2001 8:30:45 AM)
Note, the example could be modified to remember the selection in the DragOver event.

VI (12/09/2001 11:36:26 AM)
The best solution I can see is to remove the restore selection behavior on dragLeave/drop.
I think this is a reasonable thing to do.

Alternately, we can restore the selection after the dropAccept and drop listeners have been notified.

Should we do it and in what stream?

VI (25/09/2001 8:10:18 AM)
	I modified the FileViewer example to remember the dragged item in the Drag over event - temporary work around.
Comment 1 DJ Houghton CLA 2001-10-29 16:40:41 EST
PRODUCT VERSION:
1.0 134


Comment 2 Veronika Irvine CLA 2006-04-24 16:03:43 EDT
Fixed a long time ago.