+ TopoDS_Shape aShape;
+ aName = GEOMBase::GetName( aSelectedObject );
+ if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
+ TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
+ if ( myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 2 )
+ aNeedType = TopAbs_EDGE;
+
+ LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
+ TColStd_IndexedMapOfInteger aMap;
+ aSelMgr->GetIndexes( firstIObject(), aMap );
+ if ( aMap.Extent() == 1 ) {
+ int anIndex = aMap( 1 );
+ if ( aNeedType == TopAbs_EDGE )
+ aName += QString( ":edge_%1" ).arg( anIndex );
+ else
+ aName += QString( ":vertex_%1" ).arg( anIndex );
+
+ //Find SubShape Object in Father
+ GEOM::GEOM_Object_var aFindedObject = findObjectInFather( aSelectedObject, aName );
+
+ if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
+ GEOM::GEOM_IShapesOperations_var aShapesOp =
+ getGeomEngine()->GetIShapesOperations( getStudyId() );
+ aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
+ }
+ else {
+ aSelectedObject = aFindedObject;
+ }
+ }
+ else { // Global Selection
+ if ( aShape.ShapeType() != aNeedType ) {
+ aSelectedObject = GEOM::GEOM_Object::_nil();
+ aName = "";
+ }
+ }
+ }
+