Commit 33919d78 authored by legoc's avatar legoc
Browse files

Attach the reference axes to the real root node

parent 46723388
......@@ -2921,19 +2921,15 @@ public class EditorMenuBar extends MenuBar {
// Reference axis list display.
referenceAxisDisplay = new ReferenceAxisListDisplay();
// Get the root node.
Group rootNode = (Group)Nomad3DEditor.getInstance().getModel().getRoot().getSceneNode();
// We set it at the end of the group so that it is always in front of the components.
rootNode.getChildren().add(referenceAxisDisplay.getVisualGroup());
Nomad3DEditor.getInstance().getRoot().getChildren().add(referenceAxisDisplay.getVisualGroup());
}
private void removeReferenceAxes() {
if (referenceAxisDisplay != null && Nomad3DEditor.getInstance().getModel() != null) {
// Get the root node and remove the display.
Group rootNode = (Group)Nomad3DEditor.getInstance().getModel().getRoot().getSceneNode();
rootNode.getChildren().remove(referenceAxisDisplay.getVisualGroup());
// Remove the display.
Nomad3DEditor.getInstance().getRoot().getChildren().remove(referenceAxisDisplay.getVisualGroup());
referenceAxisDisplay = null;
}
}
......
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