pete_by
29 Nov 2011, 11:56 AM
Change: bug's title misses NOT word: "does NOT allow"
Current implementation does not allow moving both leafs and nodes in the same tree. Only option is possible in the same time (even in single selection mode). This is because TreeDragSource#onDragStart method tests TreeSource only for LEAF or NODE, and not BOTH. This makes hard to implement editable hierarchies.
if (getTreeGridSource() == TreeSource.LEAF) {
...
} else { // else NODE or BOTH
...
for (M item : selected) {
if (getWidget().isLeaf(item)) { // here's the problem, we reject the leafs even // if getTreeGridSource()== BOTH
event.setCancelled(true);
return;
} else {
nonLeafKeys.add(kp.getKey(item));
}
...
}
Current implementation does not allow moving both leafs and nodes in the same tree. Only option is possible in the same time (even in single selection mode). This is because TreeDragSource#onDragStart method tests TreeSource only for LEAF or NODE, and not BOTH. This makes hard to implement editable hierarchies.
if (getTreeGridSource() == TreeSource.LEAF) {
...
} else { // else NODE or BOTH
...
for (M item : selected) {
if (getWidget().isLeaf(item)) { // here's the problem, we reject the leafs even // if getTreeGridSource()== BOTH
event.setCancelled(true);
return;
} else {
nonLeafKeys.add(kp.getKey(item));
}
...
}