diff --git a/topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/DataOptionsController.java b/topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/DataOptionsController.java index 8d5417fb..db546d8e 100644 --- a/topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/DataOptionsController.java +++ b/topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/DataOptionsController.java @@ -5,7 +5,9 @@ import javafx.beans.property.SimpleDoubleProperty; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; +import javafx.event.Event; import javafx.event.EventHandler; +import javafx.event.EventTarget; import javafx.fxml.FXML; import javafx.scene.control.*; import javafx.scene.input.MouseEvent; @@ -135,6 +137,10 @@ public DataOptionsController() { fireEventOnChanged(showUnincludedCheckBox.selectedProperty(), showUnincludedCheckBox, PlotOption.SHOW_UNINCLUDED); fireEventOnChanged(resetViewOnChangeUnc.selectedProperty(), resetViewOnChangeUnc, PlotOption.RESET_VIEW_ON_CHANGE_UNC); + resetViewOnChangeUnc.selectedProperty().addListener(((observable, oldValue, newValue) -> { + Event.fireEvent(resetViewOnChangeUnc, new ResetViewEvent<>()); + })); + fireEventOnChanged(pointsFillValue, pointsFillColorPicker, PlotOption.POINTS_FILL); fireEventOnChanged(pointsOpacityValue, pointsFillColorPicker, PlotOption.POINTS_OPACITY); fireEventOnChanged(ellipsesFillValue, ellipsesFillColorPicker, PlotOption.ELLIPSES_FILL); diff --git a/topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/ResetViewEvent.java b/topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/ResetViewEvent.java new file mode 100644 index 00000000..ed852127 --- /dev/null +++ b/topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/ResetViewEvent.java @@ -0,0 +1,15 @@ +package org.cirdles.topsoil.app.control.plot.panel; + +import javafx.event.Event; +import javafx.event.EventType; + +class ResetViewEvent extends Event { + + public final static EventType RESET_VIEW = new EventType<>("RESET_VIEW"); + + + ResetViewEvent() { + super(RESET_VIEW); + } + +}