Skip to content

Commit

Permalink
Fix cleanup Field formatters not working when enabled (#6788)
Browse files Browse the repository at this point in the history
Co-authored-by: Carl Christian Snethlage <[email protected]>
  • Loading branch information
Siedlerchr and calixtus authored Aug 26, 2020
1 parent 2ce90ad commit 92161af
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ private void setupCombos() {
}

private void setupBindings() {
cleanupsEnabled.selectedProperty().bindBidirectional(cleanupsDisableProperty());
// cannot bindBidirectional, because viewModel.cleanupsDisableProperty().not() provides a read only
// BooleanBinding, but bindBidirectional requires a simple BooleanProperty
cleanupsEnabled.selectedProperty().addListener((observableValue, oldValue, newValue) ->
viewModel.cleanupsDisableProperty().setValue(!observableValue.getValue()));
viewModel.cleanupsDisableProperty().addListener((observableValue, oldValue, newValue) ->
cleanupsEnabled.setSelected(!observableValue.getValue()));

cleanupsList.itemsProperty().bind(viewModel.cleanupsListProperty());
addableFields.itemsProperty().bind(viewModel.availableFieldsProperty());
addableFields.valueProperty().bindBidirectional(viewModel.selectedFieldProperty());
Expand Down

0 comments on commit 92161af

Please sign in to comment.