diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeLight.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeLight.java index fe8464d4b..e5e4a45fe 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeLight.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeLight.java @@ -53,8 +53,8 @@ import org.openide.util.actions.SystemAction; * * @author normenhansen */ -@org.openide.util.lookup.ServiceProvider(service=SceneExplorerNode.class) -public class JmeLight extends AbstractSceneExplorerNode{ +@org.openide.util.lookup.ServiceProvider(service = SceneExplorerNode.class) +public class JmeLight extends AbstractSceneExplorerNode { private Spatial spatial; private Light light; @@ -127,7 +127,13 @@ public class JmeLight extends AbstractSceneExplorerNode{ spatial.removeLight(light); return null; } - }).get(); + }).get(); + if (getParentNode() instanceof JmeNode) { + JmeNode node = ((JmeNode) getParentNode()); + if (node != null) { + node.refresh(false); + } + } } catch (InterruptedException ex) { Exceptions.printStackTrace(ex); } catch (ExecutionException ex) { @@ -142,5 +148,4 @@ public class JmeLight extends AbstractSceneExplorerNode{ public Class getExplorerNodeClass() { return JmeLight.class; } - } diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java index 703025ae8..2e43f12bb 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java @@ -124,7 +124,6 @@ public class JmeSpatial extends AbstractSceneExplorerNode { // SystemAction.get(DeleteAction.class) // }; // } - @Override public Action[] getActions(boolean context) { // return super.getActions(context); @@ -196,10 +195,11 @@ public class JmeSpatial extends AbstractSceneExplorerNode { return null; } }).get(); - //TODO: not a good cast - JmeNode node = ((JmeNode) getParentNode()); - if (node != null) { - node.refresh(false); + if (getParentNode() instanceof JmeNode) { + JmeNode node = ((JmeNode) getParentNode()); + if (node != null) { + node.refresh(false); + } } } catch (InterruptedException ex) { Exceptions.printStackTrace(ex);