From 574259d5aa8265720385411a6b8b602364f38312 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Thu, 10 Nov 2011 03:01:41 +0000 Subject: [PATCH] SDK: - threading fix for SceneToolController git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8633 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../gde/core/scene/controller/SceneToolController.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/SceneToolController.java b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/SceneToolController.java index 290ada4a7..59ec38483 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/SceneToolController.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/SceneToolController.java @@ -102,6 +102,15 @@ public class SceneToolController implements AppState { grid = new Geometry("grid", new Grid(20, 20, 1.0f)); grid.setMaterial(grayMat); grid.setLocalTranslation(-10, 0, -10); + final Spatial cursor = this.cursor; + final Node toolsNode = this.toolsNode; + SceneApplication.getApplication().enqueue(new Callable() { + + public Object call() throws Exception { + toolsNode.attachChild(cursor); + return null; + } + }); } public void updateSelection(final Spatial spat) { @@ -366,7 +375,6 @@ public class SceneToolController implements AppState { } public void stateAttached(AppStateManager asm) { - toolsNode.attachChild(cursor); // throw new UnsupportedOperationException("Not supported yet."); }