Fix GUI validation sometimes not working

This commit is contained in:
crschnick 2023-05-24 05:19:12 +00:00
parent cad8e5e380
commit 52e930c7a3
2 changed files with 4 additions and 3 deletions

View file

@ -63,7 +63,7 @@ public class GuiDsStoreCreator extends MultiStepComp.Step<CompStructure<?>> {
this.provider = provider; this.provider = provider;
this.input = input; this.input = input;
this.filter = filter; this.filter = filter;
this.name = new SimpleStringProperty(initialName); this.name = new SimpleStringProperty(initialName != null && !initialName.isEmpty() ? initialName : null);
this.input.addListener((c, o, n) -> { this.input.addListener((c, o, n) -> {
changedSinceError.setValue(true); changedSinceError.setValue(true);
}); });

View file

@ -79,13 +79,14 @@ public class ChainedValidator implements Validator {
@Override @Override
public boolean validate() { public boolean validate() {
var valid = true;
for (var val : validators) { for (var val : validators) {
if (!val.validate()) { if (!val.validate()) {
return false; valid = false;
} }
} }
return true; return valid;
} }
@Override @Override