From 4b05e84d598da53cfcf959335cec43714bde13c7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 14 Jan 2008 10:14:32 +0000 Subject: [PATCH] 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. " --- src/osg/Group.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osg/Group.cpp b/src/osg/Group.cpp index 809a92d19..030a34aeb 100644 --- a/src/osg/Group.cpp +++ b/src/osg/Group.cpp @@ -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);