diff --git a/src/osgPlugins/txp/ReaderWriterTXP.cpp b/src/osgPlugins/txp/ReaderWriterTXP.cpp index f720b4bab..2dba9d9e6 100644 --- a/src/osgPlugins/txp/ReaderWriterTXP.cpp +++ b/src/osgPlugins/txp/ReaderWriterTXP.cpp @@ -344,13 +344,21 @@ osg::Node* SeamFinder::seamReplacement(osg::Node* node) seam->addChild(hiRes->getChild(0)); // high res } - if (nonSeamChildren.size()) + if (nonSeamChildren.empty()) { - std::cout<<"Alert *** need to place in a seperate osg::Group NOT the TXPSeamLOD"<addChild(nonSeamChildren[i]); + return seam; + } + else + { + osg::Group* newGroup = new osg::Group; + + newGroup->addChild(seam); + + for (unsigned int i = 0; i < nonSeamChildren.size(); i++) + newGroup->addChild(nonSeamChildren[i]); + + return newGroup; } - return seam; } return node;