Parcourir la source

SDK:
- another SceneToolController threading fix

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8635 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

nor..67 il y a 14 ans
Parent
commit
5c640647aa

+ 10 - 2
jme3-core/src/com/jme3/gde/core/scene/controller/SceneToolController.java

@@ -301,8 +301,16 @@ public class SceneToolController implements AppState {
 
     public void cleanup() {
         detachSelectionShape();
-        cursor.removeFromParent();
-        grid.removeFromParent();
+        final Spatial cursor = this.cursor;
+        final Spatial grid = this.grid;
+        SceneApplication.getApplication().enqueue(new Callable<Void>() {
+
+            public Void call() throws Exception {
+                cursor.removeFromParent();
+                grid.removeFromParent();
+                return null;
+            }
+        });
         SceneApplication.getApplication().getStateManager().detach(this);
     }