From 8a7cf467e7427be2937e98d256108463ed1f2954 Mon Sep 17 00:00:00 2001 From: asv Date: Thu, 26 Jan 2006 09:16:22 +0000 Subject: [PATCH] isComponent() method is fully implemented. --- src/LightApp/LightApp_Study.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; } -- 2.39.2