[Bug #740] Pop-up window asking for applying a Sigmoid function was being shown twice
FEA: ItEr64S03BugFixing
This commit is contained in:
parent
70163786af
commit
fc3cef1d64
2 changed files with 4 additions and 18 deletions
|
|
@ -48,6 +48,8 @@ public class SigmoidFunction extends AssignmentFunction {
|
|||
private void apply(ResourceAllocation<?> resourceAllocation,
|
||||
LocalDate start, LocalDate end, int totalHours) {
|
||||
|
||||
System.out.println("### SigmoidFunction.apply: " + start + "; " + end + "; " + totalHours);
|
||||
|
||||
final int daysDuration = Days.daysBetween(start, end).getDays();
|
||||
EffortDuration capacity;
|
||||
|
||||
|
|
|
|||
|
|
@ -1399,11 +1399,8 @@ class Row {
|
|||
@Override
|
||||
public void applyDefaultFunction(
|
||||
ResourceAllocation<?> resourceAllocation) {
|
||||
if (isChangeConfirmed()) {
|
||||
resourceAllocation.setAssignmentFunction(SigmoidFunction
|
||||
.create());
|
||||
reloadHours();
|
||||
}
|
||||
resourceAllocation.setAssignmentFunction(SigmoidFunction.create());
|
||||
reloadHours();
|
||||
}
|
||||
|
||||
private void reloadHours() {
|
||||
|
|
@ -1412,19 +1409,6 @@ class Row {
|
|||
fireCellChanged();
|
||||
}
|
||||
|
||||
private boolean isChangeConfirmed() {
|
||||
try {
|
||||
int status = Messagebox
|
||||
.show(_("You are going to change the assignment function. Are you sure?"),
|
||||
_("Confirm change"), Messagebox.YES
|
||||
| Messagebox.NO, Messagebox.QUESTION);
|
||||
return Messagebox.YES == status;
|
||||
} catch (InterruptedException e) {
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
private IAssignmentFunctionConfiguration[] functions = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue