Salome HOME
TC 5.1.5: SIGSEGV on closing study
[modules/geom.git] / src / TransformationGUI / TransformationGUI_OffsetDlg.cxx
index c6a59d39f2b55a783455be7cf4565bc4fa95467c..d81792e8fc7f106b3e529c38e64abad9d9ddf0d4 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_OffsetDlg.cxx
 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
@@ -105,7 +106,7 @@ void TransformationGUI_OffsetDlg::Init()
   double step = 1;
    
   /* min, max, step and decimals for spin boxes & initial values */
-  initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
+  initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
   GroupPoints->SpinBox_DX->setValue( 1e-05 );
   
   // Activate Create a Copy mode
@@ -129,6 +130,7 @@ void TransformationGUI_OffsetDlg::Init()
 
   globalSelection( GEOM_ALLSHAPES );
   resize(100,100);
+  SelectionIntoArgument();
 }
 
 
@@ -329,7 +331,8 @@ void TransformationGUI_OffsetDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStu
     // empty list of arguments means that all arguments should be restored
     getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_Transformed,
-                                         /*theInheritFirstArg=*/true );
+                                         /*theInheritFirstArg=*/true,
+                                         mainFrame()->CheckBoxAddPrefix->isChecked() );
   }
 }