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 { ...@@ -799,14 +799,9 @@ public class EditorMenuBar extends MenuBar {
updateModified(true); updateModified(true);
} }
// Hide the axes.
selectedAxis.setVisible(false); 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(); valueThread.interrupt();
addStage.close(); addStage.close();
}); });
...@@ -815,17 +810,13 @@ public class EditorMenuBar extends MenuBar { ...@@ -815,17 +810,13 @@ public class EditorMenuBar extends MenuBar {
cancelButton.setCancelButton(true); cancelButton.setCancelButton(true);
cancelButton.setOnAction(cancelEvent -> { cancelButton.setOnAction(cancelEvent -> {
Nomad3DEditor.getInstance().getAxisBuilder().stop(modified); Nomad3DEditor.getInstance().getAxisBuilder().stop(modified);
initialAxis.setVisible(false); // Hide the axes.
selectedAxis.setVisible(false);
// Reset the initial axis. // Reset the initial axis.
selectedComponent.setAxis(initialAxis); selectedComponent.resetAxis(initialAxis);
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(); valueThread.interrupt();
addStage.close(); 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