BatchNode : fixed an issue when a geometry was not unbatched when removed with sometihing else than removeFromParent
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9462 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
233627de72
commit
b97f8c1271
@ -330,12 +330,16 @@ public class Geometry extends Spatial {
|
||||
|
||||
@Override
|
||||
public boolean removeFromParent() {
|
||||
boolean removed = super.removeFromParent();
|
||||
return super.removeFromParent();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setParent(Node parent) {
|
||||
super.setParent(parent);
|
||||
//if the geometry is batched we also have to unbatch it
|
||||
if (isBatched()) {
|
||||
if(parent==null && isBatched()){
|
||||
unBatch();
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user