+ }
+
+ TopAbs_ShapeEnum aNeedType = TopAbs_EDGE;
+ if (GroupType->RadioButton2->isChecked())
+ aNeedType = TopAbs_WIRE;
+
+ std::list<GEOM::GEOM_Object_var> aList; // subshapes list
+ TopoDS_Shape aShape;
+ for (SALOME_ListIteratorOfListIO anIt (aSelList); anIt.More(); anIt.Next()) {
+ TColStd_IndexedMapOfInteger aMap;
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value() );
+ if ( !CORBA::is_nil(aSelectedObject) && GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
+ aSelMgr->GetIndexes( anIt.Value(), aMap );
+
+ if ( aMap.Extent() > 0 ) { // local selection
+ for (int ind = 1; ind <= aMap.Extent(); ind++) {
+ aString = aSelectedObject->GetName();
+ int anIndex = aMap(ind);
+ if ( aNeedType == TopAbs_EDGE )
+ aString += QString( ":edge_%1" ).arg( anIndex );
+ else
+ aString += QString( ":wire_%1" ).arg( anIndex );
+
+ //Find SubShape Object in Father
+ GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aString );
+
+ if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
+ GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+ aList.push_back( aShapesOp->GetSubShape( aSelectedObject, anIndex ) );
+ myMapToStudy[aString] = aShapesOp->GetSubShape( aSelectedObject, anIndex );
+ }
+ else {
+ aList.push_back( aFindedObject ); // get Object from study
+ }
+ }
+ } else { // global selection
+ if ( aShape.ShapeType() == aNeedType ) {
+ GEOMBase::ConvertListOfIOInListOfGO(aSelList, myEdgesAndWires);
+ } else {
+ aList.clear();
+ myEdgesAndWires.length(0);
+ }
+ }
+ }
+ }
+
+ // convert aList in listofgo
+ if ( aList.size() ) {
+ myEdgesAndWires.length( aList.size() );
+ int k = 0;
+ for ( std::list<GEOM::GEOM_Object_var>::iterator j = aList.begin(); j != aList.end(); j++ )
+ myEdgesAndWires[k++] = *j;
+ }
+
+ if ( myEdgesAndWires.length() > 1 )
+ aString = tr( "%1_objects" ).arg( myEdgesAndWires.length() );
+
+ if ( !myEdgesAndWires.length() ) {
+ aString = "";
+ myMapToStudy.clear();
+ }
+
+ myEditCurrentArgument->setText( aString );