From 87d46d0b60b8adc9d5e434a4e80c39e4db9e6204 Mon Sep 17 00:00:00 2001 From: Kay Kasemir Date: Tue, 7 Feb 2023 13:53:01 -0500 Subject: [PATCH] BoolButton: Fix property listener 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) ``` --- .../representation/javafx/widgets/BoolButtonRepresentation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/BoolButtonRepresentation.java b/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/BoolButtonRepresentation.java index c3424b7ed4..69cf32ffcf 100644 --- a/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/BoolButtonRepresentation.java +++ b/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/BoolButtonRepresentation.java @@ -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(); }