- else if ( getConstructorId() == 2 ) { // by point and two vectors
- TopoDS_Shape aShape;
- if ( GEOMBase::GetShape( aSelectedObj, aShape, TopAbs_SHAPE ) ) {
- TopAbs_ShapeEnum aNeedType = TopAbs_EDGE;
- if ( myEditCurrentArgument == Group2->LineEdit1 )
- aNeedType = TopAbs_VERTEX;
-
- TColStd_IndexedMapOfInteger aMap;
- aSelMgr->GetIndexes( anIO, aMap );
-
- if ( aMap.Extent() == 1 ) { // Local Selection
- 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 = GEOMBase_Helper::findObjectInFather( aSelectedObj, aName );
- if ( aFindedObject->_is_nil() ) { // Object not found in study
- GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
- aSelectedObj = aShapesOp->GetSubShape( aSelectedObj, anIndex );
- }
- else {
- aSelectedObj = aFindedObject; // get Object from study
- }
- }
- else { // Global Selection
- if ( aShape.ShapeType() != aNeedType ) {
- aSelectedObj = GEOM::GEOM_Object::_nil();
- aName = "";
- }
- }
-
- if ( myEditCurrentArgument == Group2->LineEdit1 ) {
- myPoint = aSelectedObj;
- myEditCurrentArgument->setText( aName );
- if (!myPoint->_is_nil() && Group2->LineEdit2->text() == "")
- Group2->PushButton2->click();
- }
- else if (myEditCurrentArgument == Group2->LineEdit2) {
- myVectorX = aSelectedObj;
- myEditCurrentArgument->setText( aName );
- if (!myVectorX->_is_nil() && Group2->LineEdit3->text() == "")
- Group2->PushButton3->click();
- }
- else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
- myVectorY = aSelectedObj;
- myEditCurrentArgument->setText( aName );
- if (!myVectorX->_is_nil() && Group2->LineEdit1->text() == "")
- Group2->PushButton1->click();
- }
- }
+ else if (myEditCurrentArgument == Group2->LineEdit2) {
+ myVectorX = aSelectedObject;
+ if (myVectorX && !myVectorY)
+ Group2->PushButton3->click();
+ }
+ else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
+ myVectorY = aSelectedObject;
+ if (myVectorY && !myPoint)
+ Group2->PushButton1->click();