Bug 30249 - [DND] Tree DND not working with selected item
Summary: [DND] Tree DND not working with selected item
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Kevin Barnes CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-26 16:56 EST by Knut Radloff CLA
Modified: 2016-04-27 05:50 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Radloff CLA 2003-01-26 16:56:50 EST
build M4

-Select an item in a tree widget, e.g., Eclipse Navigator view
-Hold down Ctrl and drag the item to its parent
->You see the drag feedback and you should be prompted for a file name when 
you drop the item on its parent. Instead the drop does nothing. The DND operation 
only works if the item is not selected when you Ctrl click it. It should be possible to 
drag an already selected item or there should be no drag feedback.
Comment 1 Steve Northover CLA 2003-01-28 18:14:34 EST
VI to investigate and advise.
Comment 2 Knut Radloff CLA 2003-01-30 13:41:52 EST
Just saw the same behavior on Motif. Wrote the following in bug 24593:
"When the dragged item is already selected I get all the normal drag behavior 
except for the final drop event. When the dragged item is not selected when I 
start the drag (i.e., the drag click selects it) I do get the drop event and 
the drag succeeds."

Changing OS field to Linux (i.e., Motif and GTK).
This is *really* broken.
Comment 3 Veronika Irvine CLA 2003-01-30 13:48:02 EST
The problem in this case is that Ctrl mouse down causes the item that was 
selected to be deselected (common multi select behaviour).  As a result, the 
Navigator DragSourceListener.DragSetData returns null in event.data which is 
invalid and terminates teh DND operation.  The Navigator 
DragSourceListener.DragStart should have detected that it had no data to drag 
and set event.doit to false and then the DND operation would never have 
happened.

I am  trying to make the emulated tree ignore the mouse down on the middle 
button if a modifier key is pressed.  This way the control mouse down will not 
deselect the item.
Comment 4 Veronika Irvine CLA 2003-01-30 13:49:45 EST
Applies to Linux Motif, Linux GTK and Mac.
Comment 5 Knut Radloff CLA 2003-01-30 14:24:26 EST
GTK uses the native tree, right? 
I'll enter bugs for Platform UI and JDT UI to fix the drag start.
Comment 6 Veronika Irvine CLA 2003-01-30 17:26:30 EST
Fixed for emulated table and tree.

Leaving open to remind us to see if we can do something about GTK.
Comment 7 Praveen CLA 2009-12-23 10:50:00 EST
This works for me on GTK with the latest HEAD. When the item is selected and dragged by Ctrl+Selected, navigator correctly recognises the situation and handles it accordingly.
Comment 8 Alexander Kurtakov CLA 2016-04-27 05:50:29 EDT
Marking as closed as per previous comment. Please reopen if you still experience the issue on supported versions.