ItEr51S04ValidacionEProbasFuncionaisItEr50S04: Fixing problem editing properties of a milestone.

This commit is contained in:
Manuel Rego Casasnovas 2010-03-18 10:11:45 +01:00 committed by Javier Moran Rua
parent c289f74be4
commit 2ba47db48c

View file

@ -149,33 +149,39 @@ public class ResourceAllocationModel implements IResourceAllocationModel {
@Override
public void cancel() {
task.setStartDate(currentStartDate);
if (currentStartDate != null) {
task.setStartDate(currentStartDate);
}
allocationRowsHandler = null;
currentStartDate = null;
}
@Override
public void accept() {
applyAllocationWithDateChangesNotification(new IOnTransaction<Void>() {
@Override
public Void execute() {
stepsBeforeDoingAllocation();
allocationRowsHandler.doAllocation().applyTo(task);
return null;
}
});
if (context != null) {
applyAllocationWithDateChangesNotification(new IOnTransaction<Void>() {
@Override
public Void execute() {
stepsBeforeDoingAllocation();
allocationRowsHandler.doAllocation().applyTo(task);
return null;
}
});
}
}
@Override
public void accept(final AllocationResult modifiedAllocationResult) {
applyAllocationWithDateChangesNotification(new IOnTransaction<Void>() {
@Override
public Void execute() {
stepsBeforeDoingAllocation();
modifiedAllocationResult.applyTo(task);
return null;
}
});
if (context != null) {
applyAllocationWithDateChangesNotification(new IOnTransaction<Void>() {
@Override
public Void execute() {
stepsBeforeDoingAllocation();
modifiedAllocationResult.applyTo(task);
return null;
}
});
}
}
private void applyAllocationWithDateChangesNotification(