Browse Source

SDK:
- Make sure SceneExplorer and FilterExplorer become visible when a scene / filter is opened

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

nor..67 14 years ago
parent
commit
29ad9f1cdc

+ 1 - 0
jme3-core/src/com/jme3/gde/core/filters/FilterExplorerTopComponent.java

@@ -161,6 +161,7 @@ public final class FilterExplorerTopComponent extends TopComponent implements Ex
         if (added) {
             setFilterEnabled(true);
         }
+        requestVisible();
     }
 
     public synchronized void setFilterEnabled(final boolean enabled) {

+ 2 - 1
jme3-core/src/com/jme3/gde/core/sceneexplorer/SceneExplorerTopComponent.java

@@ -212,7 +212,7 @@ public final class SceneExplorerTopComponent extends TopComponent implements Exp
 
     @Override
     public void componentClosed() {
-        SceneApplication.getApplication().addSceneListener(this);
+        SceneApplication.getApplication().removeSceneListener(this);
         // TODO add custom code on component closing
     }
 
@@ -274,6 +274,7 @@ public final class SceneExplorerTopComponent extends TopComponent implements Exp
         if (node != null) {
             explorerManager.setRootContext(node);
             explorerManager.getRootContext().setDisplayName(node.getName());
+            requestVisible();
         }
     }