- else if(myEditCurrentArgument == GroupPoints->LineEdit2) {
- if ( testResult && !aSelectedObject->_is_nil() )
- {
- TopoDS_Shape aShape;
-
- if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() )
- {
- LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
- TColStd_IndexedMapOfInteger aMap;
- aSelMgr->GetIndexes( firstIObject(), aMap );
- if ( aMap.Extent() == 1 )
- {
-
- int anIndex = aMap( 1 );
- aName.append( ":edge_" + QString::number( anIndex ) );
-
- //Find SubShape Object in Father
- GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
-
- if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
- GEOM::GEOM_IShapesOperations_var aShapesOp =
- getGeomEngine()->GetIShapesOperations( getStudyId() );
- myAxis = aShapesOp->GetSubShape(aSelectedObject, anIndex);
- myOkAxis = true;
- }
- else {
- myAxis = aFindedObject;
- myOkAxis = true;
- }
- }
- else {
- myOkAxis = true;
- if (aShape.ShapeType() != TopAbs_EDGE) {
- aSelectedObject = GEOM::GEOM_Object::_nil();
- aName = "";
- myOkAxis = false;
- }
- myAxis = aSelectedObject;
- }
- }
- }
+ else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
+ myAxis = getSelected( TopAbs_EDGE );
+ if ( myAxis ) {
+ QString aName = GEOMBase::GetName( myAxis.get() );
+ myEditCurrentArgument->setText( aName );
+ if ( myBaseObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ }