Commit fccec922 authored by legoc's avatar legoc
Browse files

Cancel and OK for Axis edition do not call updateScene

parent 7d564626
......@@ -799,14 +799,9 @@ public class EditorMenuBar extends MenuBar {
updateModified(true);
}
// Hide the axes.
selectedAxis.setVisible(false);
Nomad3DEditor.getInstance().getModel().clearSelection();
// We can imagine to not update the entire scene here but it is easier to do it.
// We would need to experiment how to do it properly.
updateScene();
Nomad3DEditor.getInstance().getModel().selectComponentTreeItem(selectedComponent, true);
valueThread.interrupt();
addStage.close();
});
......@@ -815,17 +810,13 @@ public class EditorMenuBar extends MenuBar {
cancelButton.setCancelButton(true);
cancelButton.setOnAction(cancelEvent -> {
Nomad3DEditor.getInstance().getAxisBuilder().stop(modified);
initialAxis.setVisible(false);
// Hide the axes.
selectedAxis.setVisible(false);
// Reset the initial axis.
selectedComponent.setAxis(initialAxis);
Nomad3DEditor.getInstance().getModel().clearSelection();
selectedComponent.resetAxis(initialAxis);
// We can imagine to not update the entire scene here but it is easier to do it.
// We would need to experiment how to do it properly.
updateScene();
Nomad3DEditor.getInstance().getModel().selectComponentTreeItem(selectedComponent, true);
valueThread.interrupt();
addStage.close();
});
......
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