diff --git a/src/osg/Switch.cpp b/src/osg/Switch.cpp index de82500f6..82de3ff76 100644 --- a/src/osg/Switch.cpp +++ b/src/osg/Switch.cpp @@ -62,8 +62,7 @@ bool Switch::removeChild( Node *child ) _values.erase(_values.begin()+pos); - return Group::removeChild(child); - + return Group::removeChild(child); } void Switch::setValue(unsigned int pos,bool value) diff --git a/src/osgPlugins/flt/flt2osg.cpp b/src/osgPlugins/flt/flt2osg.cpp index 7d5d4edcf..99f0e8fc1 100644 --- a/src/osgPlugins/flt/flt2osg.cpp +++ b/src/osgPlugins/flt/flt2osg.cpp @@ -911,7 +911,7 @@ osg::Group* ConvertFromFLT::visitSwitch(osg::Group& osgParent, SwitchRecord* rec if (nChildgetNumChildren()) { - osgSwitch->setValue(nChild,(pSSwitch->aMask[nMaskWord] & (uint32(1) << nMaskBit))); + osgSwitch->setValue(nChild,(pSSwitch->aMask[nMaskWord] & (uint32(1) << nMaskBit))!=0); } } diff --git a/src/osgPlugins/osg/Switch.cpp b/src/osgPlugins/osg/Switch.cpp index 20b41aa52..67605e6d3 100644 --- a/src/osgPlugins/osg/Switch.cpp +++ b/src/osgPlugins/osg/Switch.cpp @@ -64,7 +64,7 @@ bool Switch_readLocalData(Object& obj, Input& fr) int value; if (fr[0].getInt(value)) { - sw.setValue(pos,value); + sw.setValue(value); ++pos; } ++fr; @@ -96,7 +96,7 @@ bool Switch_writeLocalData(const Object& obj, Output& fw) itr!=values.end(); ++itr) { - fw.indent()<<*itr<