- aListForGlue->length( toGlue.size() );
- ObjectList::iterator anIter3 = toGlue.begin();
- for ( int i = 0; anIter3 != toGlue.end(); ++anIter3, ++i )
- aListForGlue[ i ] = *anIter3;
- GEOM::GEOM_Object_var anObj = anOper->MakeGlueFacesByList( myObject, myTolEdt2->value(), aListForGlue, true );
+ aListForGlue->length( myTmpObjs.count() );
+ int added = 0;
+ for ( int i = 0; i < myTmpObjs.count(); i++ ) {
+ CORBA::String_var tmpior = myGeomGUI->getApp()->orb()->object_to_string(myTmpObjs[i].get());
+ if ( selected.contains( tmpior.in() ) )
+ aListForGlue[ added++ ] = myTmpObjs[i].copy();
+ }
+ aListForGlue->length( added );
+
+ GEOM::GEOM_Object_var anObj = anOper->MakeGlueFacesByList( myObject, myTolEdt2->value(), aListForGlue.in(), true );