Salome HOME
TC 5.1.5: SIGSEGV on closing study
[modules/geom.git] / src / TransformationGUI / TransformationGUI_RotationDlg.cxx
index e8767f4de70cdc904a44641913318adf9fe6c578..e33e32d51aff8011b2e32dfa333a9b1a587287cd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // GEOM GEOMGUI : GUI for Geometry component
 // File   : TransformationGUI_RotationDlg.cxx
 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
@@ -122,7 +123,7 @@ void TransformationGUI_RotationDlg::Init()
   double SpecificStep = 5;
 
   // min, max, step and decimals for spin boxes & initial values
-  initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
+  initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, "angle_precision" );
   GroupPoints->SpinBox_DX->setValue(anAngle);
 
   // init variables
@@ -235,6 +236,11 @@ bool TransformationGUI_RotationDlg::ClickOnApply()
     return false;
 
   initName();
+
+  myObjects.length(0);
+  myEditCurrentArgument = GroupPoints->LineEdit1;
+  myEditCurrentArgument->setText("");
+
   // activate selection and connect selection manager
   ConstructorsClicked(getConstructorId());
   return true;
@@ -310,7 +316,7 @@ void TransformationGUI_RotationDlg::SelectionIntoArgument()
         //Find SubShape Object in Father
         GEOM::GEOM_Object_var aFindedObject = 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);