mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
Fix GUI validation sometimes not working
This commit is contained in:
parent
cad8e5e380
commit
52e930c7a3
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue