Salome HOME
TC 5.1.5: SIGSEGV on closing study
[modules/geom.git] / src / TransformationGUI / TransformationGUI_PositionDlg.cxx
index 288eae6c05aaf506a26193c9e7778ee5888258c7..ccbc45ab307539fcc93998adc499266e1ce7de7d 100644 (file)
@@ -300,6 +300,11 @@ bool TransformationGUI_PositionDlg::ClickOnApply()
     return false;
 
   initName();
+
+  myObjects.length(0);
+  myEditCurrentArgument = Group1->LineEdit1;
+  myEditCurrentArgument->setText("");
+
   // activate selection and connect selection manager
   ConstructorsClicked(getConstructorId());
   return true;
@@ -340,8 +345,8 @@ void TransformationGUI_PositionDlg::SelectionIntoArgument()
     else
       myEditCurrentArgument->setText(aName);
 
-    if (getConstructorId() == 2)
-      Group1->PushButton5->click();
+    /*    if (getConstructorId() == 2)
+          Group1->PushButton5->click();*/
   }
   else if (myEditCurrentArgument == Group1->LineEdit2) {
     if (aSelList.Extent() != 1)
@@ -401,7 +406,7 @@ void TransformationGUI_PositionDlg::SelectionIntoArgument()
       //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
+      if (aFindedObject->_is_nil()) { // Object not found in study
         GEOM::GEOM_IShapesOperations_var aShapesOp =
           getGeomEngine()->GetIShapesOperations(getStudyId());
         aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);