XTREE drag-drop multi-level enhancement: when dragging a parent item whose children are all collapsed, the entire set (parent + children) is now dragged as a single unit. Previously the hierarchical levels were ignored and each item was dragged irrespective of its level.
Note the following:
• | This only applies when the children are collapsed (not visible). If they are expanded (visible), then the behavior reverts to ignoring the levels and treating each item independently. |
• | Even though the parent/child group may be moved as a unit, depending on where it is dropped, it may still disrupt and/or merge with existing parent/child groups. For example, if the parent is dropped between two children of another group, the target parent/child group will be split, with the children above the drop point remaining with their prior parent, and the children below the drop point joining the parent/child group being dropped. (The question of whether to limit the legal drop points to avoid this kind of side-effect is under review.) |
• | Moving a parent/child group does not affect their absolute levels in the hierarchy. An item at level x will remain at level x, regardless of where it is moved to. In other words, a parent cannot be converted into a child of another parent via drag-drop. The application could implement such an effect though, by detecting the drop via the Advanced Coldef Option DropExit=###, using the SELECTION and ORG'ROW fields in the answer array to identify the items that were moved and where they were moved to, and adjusting the level fields up or down before re-entering the tree with XTROP_REPLACE. |
• | There is currently no Undo operation for drag-drop—although again, the application could implement this by reloading the tree contents from a previously saved copy of the data array. |
Developers are therefore urged to exercise caution when implementing drag-drop, especially in conjunction with multi-level trees.