From Daniel Stien, "When removing a child from a osg::Group, childRemoved is called after the
node has already been erased from the node list, causing childRemoved to be performed on the consecutive node. Lines 180 and 182 are swapped in the attached Group.cpp. "
This commit is contained in:
@@ -177,10 +177,10 @@ bool Group::removeChildren(unsigned int pos,unsigned int numChildrenToRemove)
|
||||
|
||||
}
|
||||
|
||||
_children.erase(_children.begin()+pos,_children.begin()+endOfRemoveRange);
|
||||
|
||||
childRemoved(pos,endOfRemoveRange-pos);
|
||||
|
||||
_children.erase(_children.begin()+pos,_children.begin()+endOfRemoveRange);
|
||||
|
||||
if (updateCallbackRemoved)
|
||||
{
|
||||
setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()-updateCallbackRemoved);
|
||||
|
||||
Reference in New Issue
Block a user