Merge pull request #201 from Bebul/invalidateUpdateListOptimization
Fix invalidateUpdateList not to use both cycle and recursion traverse
This commit is contained in:
commit
44c860e2d2
@ -199,15 +199,15 @@ public class Node extends Spatial implements Savable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to invalide the root node's update list. This is
|
* Called to invalidate the root node's update list. This is
|
||||||
* called whenever a spatial is attached/detached as well as
|
* called whenever a spatial is attached/detached as well as
|
||||||
* when a control is added/removed from a Spatial in a way
|
* when a control is added/removed from a Spatial in a way
|
||||||
* that would change state.
|
* that would change state.
|
||||||
*/
|
*/
|
||||||
void invalidateUpdateList() {
|
void invalidateUpdateList() {
|
||||||
updateListValid = false;
|
updateListValid = false;
|
||||||
for( Node n = parent; n != null; n = n.getParent() ) {
|
if ( parent != null ) {
|
||||||
n.invalidateUpdateList();
|
parent.invalidateUpdateList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user