The code.ill.fr has been recreated and upgraded with the latest version this weekend, If you encounter any problem please inform the Helpdesk.

Commit 4769ce9f authored by yannick legoc's avatar yannick legoc
Browse files

Corrected Axis Size window

parent 13d9fa49
......@@ -1993,18 +1993,6 @@ public class EditorMenuBar extends MenuBar {
valueField.setPrefWidth(100);
modifyPane.addRow(2, valueLabel, valueField);
valueField.setOnAction(valueEvent -> {
try {
double value = Double.parseDouble(valueField.getText());
Axis.displaySize = value;
}
catch (Exception e) {
// Invalid input, reset to 1.
Axis.displaySize = 1;
}
});
GridPane sliderPane = new GridPane();
sliderPane.setVgap(5);
sliderPane.setHgap(10);
......@@ -2018,10 +2006,24 @@ public class EditorMenuBar extends MenuBar {
sliderPane.addRow(0, slider);
scenePane.addRow(1, sliderPane);
GridPane.setMargin(sliderPane, new Insets(10));
valueField.setOnAction(valueEvent -> {
try {
double value = Double.parseDouble(valueField.getText());
Axis.displaySize = value;
slider.setValue(value);
}
catch (Exception e) {
// Invalid input, reset to 1.
Axis.displaySize = 1;
}
});
slider.valueProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
Axis.displaySize = newValue.doubleValue();
valueField.setText(String.format("%.3f", Axis.displaySize));
if (referenceAxisDisplay != null) {
removeReferenceAxes();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment