ItEr42S17CUGravacionModelosUnidadesTraballoItEr41S20: Fixing problem when adding elements to leaf.

The previous leaf must be added to the newly created containter after the replace is done. When doing the replace, the scheduling state was being detached of the newly created container.
This commit is contained in:
Óscar González Fernández 2010-01-04 18:01:15 +01:00
parent ac11bc3f8d
commit f511d130b3
2 changed files with 1 additions and 2 deletions

View file

@ -111,8 +111,6 @@ public class OrderLine extends OrderElement {
if (getCode() != null) {
this.setCode(getCode());
}
result.add(this);
return result;
}

View file

@ -128,6 +128,7 @@ public abstract class EntitiesTree<T extends ITreeNode<T>> {
.toContainer();
parentContainer.replace(selectedForTurningIntoContainer.getThis(),
asContainer.getThis());
asContainer.add(selectedForTurningIntoContainer.getThis());
tree.replace(selectedForTurningIntoContainer.getThis(), asContainer
.getThis());
addChildren(tree, Collections.singletonList(asContainer.getThis()));