SDK : fixed scene explorer refresh when deleting a light node

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7926 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 14 years ago
parent 1b623df1ab
commit 48e4522da5
  1. 7
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeLight.java
  2. 4
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeSpatial.java

@ -128,6 +128,12 @@ public class JmeLight extends AbstractSceneExplorerNode{
return null; return null;
} }
}).get(); }).get();
if (getParentNode() instanceof JmeNode) {
JmeNode node = ((JmeNode) getParentNode());
if (node != null) {
node.refresh(false);
}
}
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
Exceptions.printStackTrace(ex); Exceptions.printStackTrace(ex);
} catch (ExecutionException ex) { } catch (ExecutionException ex) {
@ -142,5 +148,4 @@ public class JmeLight extends AbstractSceneExplorerNode{
public Class getExplorerNodeClass() { public Class getExplorerNodeClass() {
return JmeLight.class; return JmeLight.class;
} }
} }

@ -124,7 +124,6 @@ public class JmeSpatial extends AbstractSceneExplorerNode {
// SystemAction.get(DeleteAction.class) // SystemAction.get(DeleteAction.class)
// }; // };
// } // }
@Override @Override
public Action[] getActions(boolean context) { public Action[] getActions(boolean context) {
// return super.getActions(context); // return super.getActions(context);
@ -196,11 +195,12 @@ public class JmeSpatial extends AbstractSceneExplorerNode {
return null; return null;
} }
}).get(); }).get();
//TODO: not a good cast if (getParentNode() instanceof JmeNode) {
JmeNode node = ((JmeNode) getParentNode()); JmeNode node = ((JmeNode) getParentNode());
if (node != null) { if (node != null) {
node.refresh(false); node.refresh(false);
} }
}
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
Exceptions.printStackTrace(ex); Exceptions.printStackTrace(ex);
} catch (ExecutionException ex) { } catch (ExecutionException ex) {

Loading…
Cancel
Save