Fix pipeline

This commit is contained in:
Moritz Dieing 2021-02-17 17:36:17 +01:00
parent 43af68812e
commit eb33ce11bf

View File

@ -69,16 +69,8 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver
assumptionContainer = new VerticalLayout();
assumptionContainer.setId(ASS_CONTAINER_ID);
for (Map.Entry<String, String> param : types.entrySet()) {
TypeAssumptionField assumption = new TypeAssumptionField(value -> {
assumptionContainer.remove(value);
fields.remove(value);
}, param.getKey(), param.getValue());
assumptionContainer.add(assumption);
fields.add(assumption);
}
initializeWithAssumptions(types);
layout.add(heading, buttons, assumptionContainer);
add(layout);
setCloseOnOutsideClick(false);
@ -90,6 +82,17 @@ public class TypeAssumptionsArea extends Dialog implements LocaleChangeObserver
protected TypeAssumptionsArea() {
this(new HashMap<>());
}
private void initializeWithAssumptions(Map<String, String> types) {
for (Map.Entry<String, String> param : types.entrySet()) {
TypeAssumptionField assumption = new TypeAssumptionField(value -> {
assumptionContainer.remove(value);
fields.remove(value);
}, param.getKey(), param.getValue());
assumptionContainer.add(assumption);
fields.add(assumption);
}
}
private void onAddAssumptionClicked() {
TypeAssumptionField assumption = new TypeAssumptionField(value -> {