From: asv Date: Thu, 26 Jan 2006 09:16:22 +0000 (+0000) Subject: isComponent() method is fully implemented. X-Git-Tag: SPDev_start~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8a7cf467e7427be2937e98d256108463ed1f2954;p=modules%2Fgui.git isComponent() method is fully implemented. --- diff --git a/src/LightApp/LightApp_Study.cxx b/src/LightApp/LightApp_Study.cxx index e6b6f04a2..b32f4945e 100644 --- a/src/LightApp/LightApp_Study.cxx +++ b/src/LightApp/LightApp_Study.cxx @@ -264,6 +264,18 @@ void LightApp_Study::children( const QString&, QStringList& ) const //================================================================ bool LightApp_Study::isComponent( const QString& entry ) const { + if( !root() ) + return false; + + DataObjectList ch; + root()->children( ch ); + DataObjectList::const_iterator anIt = ch.begin(), aLast = ch.end(); + for( ; anIt!=aLast; anIt++ ) + { + LightApp_DataObject* obj = dynamic_cast( *anIt ); + if( obj && obj->entry()==entry ) + return true; + } return false; }