ItEr57S15RecalculosConexionEscenarios: Fix bug.

The bug happens when moving a task if the final position is the same
as before moving it. In that case the task is left in the position
onto which is moved instead of the correct position(the initial
position). This happens because a no event is produced, old value is
equal to new value. Checking for this on TaskComponent.
This commit is contained in:
Óscar González Fernández 2010-05-16 01:04:51 +02:00
parent eeefaf5362
commit 1ebc117466

View file

@ -331,7 +331,13 @@ public class TaskComponent extends Div implements AfterCompose {
}
void doUpdatePosition(String leftX, String topY) {
Date startBeforeMoving = this.task.getBeginDate();
this.task.moveTo(getMapper().toDate(stripPx(leftX)));
boolean remainsInOriginalPosition = this.task.getBeginDate().equals(
startBeforeMoving);
if (remainsInOriginalPosition) {
updateProperties();
}
}
void doUpdateSize(String size) {