/** Removes the from scene. */ public void removeFromScene() { MTComponent cursorTraceContainer = null; MTCanvas canvas = scene.getCanvas(); /* //Re-use cursor trace group which is always on top for this menu MTComponent[] children = canvas.getChildren(); for (int i = 0; i < children.length; i++) { MTComponent component = children[i]; if (component instanceof MTOverlayContainer && component.getName().equalsIgnoreCase("Cursor Trace group")){ cursorTraceContainer = component; if (cursorTraceContainer.containsChild(this)){ cursorTraceContainer.removeChild(this); } } } */ // /* // cursor tracer group NOT found in the scene -> add overlay container to canvas if (cursorTraceContainer == null) { if (canvas.containsChild(overlayGroup)) { canvas.removeChild(overlayGroup); } } // */ }