- if ( theObj->isComponentType( "GEOM" ) )
- {
- Standard_Boolean aRes = Standard_False;
- GEOM::GEOM_Object_var aGeomObj = GEOMBase::ConvertIOinGEOMObject( theObj, aRes );
- return aRes ? aGeomObj._retn() : GEOM::GEOM_Object::_nil();
- }
- else
- {
- // Get geom object corresponding to the mesh
- SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
- SALOMEDS::SObject_var aSO = aStudy->FindObjectID( theObj->getEntry() );
- if ( aSO->_is_nil() )
- return GEOM::GEOM_Object::_nil();
-
- SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator( aSO );
- for( ; anIter->More(); anIter->Next() )
- {
- SALOMEDS::SObject_var aSO = anIter->Value();
- SALOMEDS::SObject_var aRefSO;
-
- GEOM::GEOM_Object_var aMeshShape = GEOM::GEOM_Object::_narrow(
- aSO->ReferencedObject( aRefSO )? aRefSO->GetObject() : aSO->GetObject() );
-
- if ( !aMeshShape->_is_nil() )
- return aMeshShape._retn();
- }
+ const LightApp_DataOwner* owner =
+ dynamic_cast<const LightApp_DataOwner*>(theDataOwner);
+ SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>
+ (SUIT_Session::session()->activeApplication()->activeStudy());