Commit 450e9058 authored by legoc's avatar legoc
Browse files

Corrected bug with inverse parent transform

parent 54a73f5d
......@@ -779,6 +779,9 @@ public class EditorMenuBar extends MenuBar {
}
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();
......@@ -793,6 +796,9 @@ public class EditorMenuBar extends MenuBar {
// Reset the initial axis.
selectedComponent.setAxis(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();
......@@ -2462,6 +2468,10 @@ public class EditorMenuBar extends MenuBar {
// Save the expanded state of the tree items.
HashMap<String, Boolean> itemStates = Nomad3DEditor.getInstance().getTreeViewExpandedStates(Nomad3DEditor.getInstance().getModel().getRoot().getTreeItem());
// We need to reset the movement here.
// We prefer to do it in any case because even for axis edition, the change of axis (when cancelling) resets the axis to the initial clone.
// It would be necessary to see how to do be able to keep the axis states in the case of reset.
Nomad3DEditor.getInstance().getModel().resetMovement();
Nomad3DEditor.getInstance().getModel().clearSelection();
Nomad3DEditor.getInstance().getRoot().getChildren().remove(Nomad3DEditor.getInstance().getModel().getRoot().getSceneNode());
Nomad3DEditor.getInstance().getModel().computeSceneHierarchies(activeLod);
......
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