Skip to content

Commit

Permalink
BoolButton: Fix property listener
Browse files Browse the repository at this point in the history
The button registers `confirmDialogWidgetPropertyListener` for the `propConfirmDialog` but then removes that from the `propMode`, resulting in this stack trace:
```
SEVERE [org.csstudio.display.builder.model] Unknown listener org.csstudio.display.builder.representation.javafx.widgets.BoolButtonRepresentation$$Lambda$1503/0x000000080115b620@411bed6c
java.lang.Exception: Unknown listener
	at org.csstudio.display.builder.model.properties.PropertyChangeHandler.removePropertyListener(PropertyChangeHandler.java:119)
	at org.csstudio.display.builder.representation.javafx.widgets.BoolButtonRepresentation.unregisterListeners(BoolButtonRepresentation.java:226)
	at org.csstudio.display.builder.representation.javafx.widgets.JFXBaseRepresentation.dispose(JFXBaseRepresentation.java:247)
	at org.csstudio.display.builder.representation.WidgetRepresentation.destroy(WidgetRepresentation.java:88)
```
  • Loading branch information
kasemir authored Feb 7, 2023
1 parent 44e3c31 commit 87d46d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ protected void unregisterListeners()
model_widget.propBit().removePropertyListener(bitChangedListener);
model_widget.runtimePropValue().removePropertyListener(valueChangedListener);
model_widget.propMode().removePropertyListener(modeChangeListener);
model_widget.propMode().removePropertyListener(confirmDialogWidgetPropertyListener);
model_widget.propConfirmDialog().removePropertyListener(confirmDialogWidgetPropertyListener);
super.unregisterListeners();
}

Expand Down

0 comments on commit 87d46d0

Please sign in to comment.