Salome HOME
Update copyright notes (for 2010)
[modules/geom.git] / src / TransformationGUI / TransformationGUI_ScaleDlg.cxx
index 3384b18167423ba6a9098330e30c1c8a522b6698..5dd32300b9664d578bf6ea9fd59726da5ccffc71 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_ScaleDlg.cxx
 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
@@ -155,9 +156,9 @@ void TransformationGUI_ScaleDlg::Init()
   double aFactor = 2.0;
   double SpecificStep = 0.5;
 
-  initSpinBox(SpinBox_FX, COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
-  initSpinBox(SpinBox_FY, COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
-  initSpinBox(SpinBox_FZ, COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
+  initSpinBox(SpinBox_FX, COORD_MIN, COORD_MAX, SpecificStep, "parametric_precision" );
+  initSpinBox(SpinBox_FY, COORD_MIN, COORD_MAX, SpecificStep, "parametric_precision" );
+  initSpinBox(SpinBox_FZ, COORD_MIN, COORD_MAX, SpecificStep, "parametric_precision" );
   SpinBox_FX->setValue(aFactor);
   SpinBox_FY->setValue(aFactor);
   SpinBox_FZ->setValue(aFactor);
@@ -182,8 +183,9 @@ void TransformationGUI_ScaleDlg::Init()
   connect(SpinBox_FX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
   connect(SpinBox_FY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
   connect(SpinBox_FZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
-
-  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
+  
+  // san : Commented so as not to override specific step settings
+  //connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
 
   connect(CheckBoxCopy, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool)));
 
@@ -344,10 +346,11 @@ void TransformationGUI_ScaleDlg::SelectionIntoArgument()
   }
 
   // clear selection
-  disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+  /*  disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
   myGeomGUI->getApp()->selectionMgr()->clearSelected();
   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
-          this, SLOT(SelectionIntoArgument()));
+  this, SLOT(SelectionIntoArgument()));*/
+  // here commented, because multiple objects can be selected IPAL 21437
 
   displayPreview();
 }
@@ -412,7 +415,7 @@ void TransformationGUI_ScaleDlg::ActivateThisDialog()
 {
   GEOMBase_Skeleton::ActivateThisDialog();
   connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
-          this, SLOT( SelectionIntoArgument() ) );
+           this, SLOT( SelectionIntoArgument() ) );
 
   ConstructorsClicked( getConstructorId() );
 }
@@ -524,7 +527,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects)
         for (int i = 0; i < myObjects.length(); i++)
         {
           anObj = anOper->ScaleShapeAlongAxesCopy(myObjects[i], myPoint, SpinBox_FX->value(),
-                                                 SpinBox_FY->value(), SpinBox_FZ->value());
+                                                  SpinBox_FY->value(), SpinBox_FZ->value());
           if (!anObj->_is_nil())
             if(!IsPreview()) {
               QStringList aParameters;
@@ -541,7 +544,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects)
         for (int i = 0; i < myObjects.length(); i++)
         {
           anObj = anOper->ScaleShapeAlongAxes(myObjects[i], myPoint, SpinBox_FX->value(),
-                                             SpinBox_FY->value(), SpinBox_FZ->value());
+                                              SpinBox_FY->value(), SpinBox_FZ->value());
           if (!anObj->_is_nil())
             objects.push_back(anObj._retn());
         }
@@ -566,7 +569,8 @@ void TransformationGUI_ScaleDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStud
     // 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());
   }
 }