Bug 139666

Summary: [DnD] TreeViewerTransferDropListener causes reorder problems
Product: [Tools] GEF Reporter: David Dubrow <david.dubrow>
Component: GEF-Legacy GEF (MVC)Assignee: Anthony Hunter <ahunter.eclipse>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: djeglzpddnxyy, misschocoe-itpro, nyssen
Version: 3.1.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Potential bug fix none

Description David Dubrow CLA 2006-05-02 09:19:55 EDT
TreeViewerTransferDropListener.getCommand() iterates the TreeViewerTransfer items, gathering a command for each one separately. This causes a problem when multiple objects are dragged to a location in front of their current one. If each item is going to the same index, each subsequent object will be placed in front of the previous one, reversing their original order, even though they were being dragged together. It would be best to package up all the objects in a single command rather than iterating and gathering commands for each separately.

This problem is clearly visible in the Logic example. Add several items, select a couple of adjacent ones in the outline and drag them upwards. They will be left in the reverse order in which they appeared originally.
Comment 1 David Dubrow CLA 2006-09-12 09:22:46 EDT
Has anything been done on this? Thanks.
Comment 2 David Dubrow CLA 2006-09-19 14:47:00 EDT
Created attachment 50498 [details]
Potential bug fix

This changes getting a REQ_MOVE command from each child with getting REQ_MOVE_CHILDREN command from parent for the case where isMove() is true. That allows command to be aware of other children being moved rather than each child being moved in isolation.
Comment 3 Anthony Hunter CLA 2007-03-22 07:52:46 EDT
*** Bug 156100 has been marked as a duplicate of this bug. ***
Comment 4 Mélanie Gauthier CLA 2007-12-05 13:17:51 EST
Without removing the necessity of performing the change suggested in the attach file, I think making all class required to use the drag & drop in the tree viewer public could increase the flexibility available to programmer. 
Comment 5 Alexander Nyßen CLA 2013-10-17 09:44:42 EDT
Unset target milestone as the specified one is already passed.