Commit 2b7c8578 authored by Ivan Dages's avatar Ivan Dages
Browse files

axis link : type mismatch indication

parent fb0958e7
......@@ -552,6 +552,21 @@ public class EditorMenuBar extends MenuBar {
selectButton.setOnAction(selEvent -> {
Nomad3DController selectedController = controllersList.getSelectionModel().getSelectedItem();
if (!((selectedAxis.getType() == Axis.Type.ROTATION
&& selectedController.getType() == Nomad3DController.Type.ROTATION)
|| (selectedAxis.getType() == Axis.Type.TRANSLATION
&& selectedController.getType() == Nomad3DController.Type.TRANSLATION))) {
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle(linkAxisItem.getText());
alert.setContentText("The selected axis and controller do not have the same type.");
Optional<ButtonType> res = alert.showAndWait();
if (res.isPresent()) {
if (res.get() != ButtonType.OK) {
return;
}
}
}
linkStage.close();
Alert alert = new Alert(AlertType.CONFIRMATION);
......
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