Revert "Fix bug"

The bug was present when introducing a dependency between containers,
the children were not affected by the movement of the parent. The
solution fixed this problem, but introduced others. For example
when adding a dependency from a top level task that is not a
container to a container.

This reverts commit 48ba72511d.

FEA: ItEr74S04BugFixing
This commit is contained in:
Óscar González Fernández 2011-06-01 14:03:29 +02:00
parent b56a510c34
commit 74ecf0e493

View file

@ -459,13 +459,6 @@ public class GanttDiagramGraph<V, D extends IDependency<V>> implements
@Override
public int compare(Recalculation o1, Recalculation o2) {
// recalculations that are parent recalculations must go
// first
int result = asInt(o2.parentRecalculation)
- asInt(o1.parentRecalculation);
if (result != 0) {
return result;
}
int o1Depth = onNullDefault(
taskPointsByDepth.get(o1.taskPoint),
Integer.MAX_VALUE, "no depth value for "
@ -474,7 +467,12 @@ public class GanttDiagramGraph<V, D extends IDependency<V>> implements
taskPointsByDepth.get(o2.taskPoint),
Integer.MAX_VALUE, "no depth value for "
+ o2.taskPoint);
return o1Depth - o2Depth;
int result = o1Depth - o2Depth;
if (result == 0) {
return asInt(o2.parentRecalculation)
- asInt(o1.parentRecalculation);
}
return result;
}
private int asInt(boolean b) {