From Aurelien Albert, "There is a little bug in the osg::Group::insertChild method :
If the index is more than the size of _children vector, the new child is pushed at the end of the vector, but the index value is unmodified, so an incorrect value is passed to the "childInserted" method."
This commit is contained in:
@@ -86,6 +86,7 @@ bool Group::insertChild( unsigned int index, Node *child )
|
||||
// note ref_ptr<> automatically handles incrementing child's reference count.
|
||||
if (index >= _children.size())
|
||||
{
|
||||
index = _children.size(); // set correct index value to be passed to the "childInserted" method
|
||||
_children.push_back(child);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user