Skip to content

Commit

Permalink
Applied code style suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Kammel committed Nov 7, 2023
1 parent 29d40fa commit 91c49d3
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ public AbstractPropertyEditor(Item property, C control, boolean readonly) {
this.control = control;
this.property = property;

if (property.getObservableValue().isPresent()) {
property.getObservableValue().get().addListener((ObservableValue<? extends Object> o, Object oldValue, Object newValue) -> {
if (! suspendUpdate) {
suspendUpdate = true;
AbstractPropertyEditor.this.setValue((T) property.getValue());
suspendUpdate = false;
}
});
}
property.getObservableValue().ifPresent(obs -> obs.addListener((ObservableValue<?> o, Object oldValue, Object newValue) -> {
if (!suspendUpdate) {
suspendUpdate = true;
AbstractPropertyEditor.this.setValue((T) property.getValue());
suspendUpdate = false;
}
}));

if (! readonly) {
getObservableValue().addListener((ObservableValue<? extends Object> o, Object oldValue, Object newValue) -> {
Expand Down

0 comments on commit 91c49d3

Please sign in to comment.