- Fix threading in SceneExplorer while opening scene

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8033 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 5cf01fcffe
commit c3b870fae3
  1. 13
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/SceneExplorerTopComponent.java

@ -266,15 +266,20 @@ public final class SceneExplorerTopComponent extends TopComponent implements Exp
public void sceneRequested(SceneRequest request) { public void sceneRequested(SceneRequest request) {
this.request = request; this.request = request;
JmeNode node = request.getJmeNode(); final JmeNode node = request.getJmeNode();
for (Iterator it = materialChangeProviders.values().iterator(); it.hasNext();) { for (Iterator it = materialChangeProviders.values().iterator(); it.hasNext();) {
MaterialChangeProvider provider = (MaterialChangeProvider) it.next(); MaterialChangeProvider provider = (MaterialChangeProvider) it.next();
provider.clearMaterialChangeListeners(); provider.clearMaterialChangeListeners();
} }
if (node != null) { if (node != null) {
explorerManager.setRootContext(node); java.awt.EventQueue.invokeLater(new Runnable() {
explorerManager.getRootContext().setDisplayName(node.getName());
requestVisible(); public void run() {
explorerManager.setRootContext(node);
explorerManager.getRootContext().setDisplayName(node.getName());
requestVisible();
}
});
} }
} }

Loading…
Cancel
Save