Bug 139666 - [DnD] TreeViewerTransferDropListener causes reorder problems
Summary: [DnD] TreeViewerTransferDropListener causes reorder problems
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 156100 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-02 09:19 EDT by David Dubrow CLA
Modified: 2013-10-17 09:44 EDT (History)
3 users (show)

See Also:


Attachments
Potential bug fix (1.62 KB, patch)
2006-09-19 14:47 EDT, David Dubrow CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.