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:
parent
eeefaf5362
commit
1ebc117466
1 changed files with 6 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue