Skip to content

Commit

Permalink
Calling onMOdelLayerRemoved when the MapNode is destructed to fully r…
Browse files Browse the repository at this point in the history
…emove the ModelLayer from the MapNode.
  • Loading branch information
Jason Beverage committed Oct 7, 2011
1 parent cfe9176 commit 2614cfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/osgEarth/MapNode.cpp
Expand Up @@ -315,10 +315,10 @@ MapNode::~MapNode()

ModelLayerVector modelLayers;
_map->getModelLayers( modelLayers );
//Remove our model callback from any of the model layers in the map
//Remove our model callback from any of the model layers in the map
for (osgEarth::ModelLayerVector::iterator itr = modelLayers.begin(); itr != modelLayers.end(); ++itr)
{
itr->get()->removeCallback(_modelLayerCallback.get() );
this->onModelLayerRemoved( itr->get() );
}
}

Expand Down

0 comments on commit 2614cfd

Please sign in to comment.