ItEr05S03ArquitecturaClientesItEr04S03: Fixing bug: If the task is aligned with the previous one, moving it backwards doesn't update the position.

The fix consists of forcing the smart update, so the position is updated even if the date is not changed. This way the new client position is discarded.
This commit is contained in:
Óscar González Fernández 2009-04-27 21:27:34 +02:00 committed by Javier Moran Rua
parent 752cb910f0
commit 59cb273452

View file

@ -284,11 +284,19 @@ public class Task extends Div {
}
private void updateProperties() {
/*
* It is set to another value, so the smart update is forced. If the new
* value is equal to the previous, the smart update wouldn't be sent and
* it would keep the same position in the client. This position could be
* the result of dragging the task, so it would seem that the dependency
* is not enforced.
*/
setLeft("0");
setLeft(getMapper().toPixels(this.taskBean.getBeginDate()) + "px");
setWidth("0");
setWidth(getMapper().toPixels(this.taskBean.getLengthMilliseconds())
+ "px");
smartUpdate("name", this.taskBean.getName());
}
public void remove() {