Salome HOME
Issue 0020580: improved validation in integer and double spin boxes, possibility...
[modules/geom.git] / src / BlocksGUI / BlocksGUI_TrsfDlg.cxx
index 9508f69e9f656a6165ede0f36e1463ebb6d0dcac..2fa2ae849f836418d83d2357fe07358491e4fefd 100644 (file)
@@ -114,7 +114,6 @@ void BlocksGUI_TrsfDlg::Init()
   int SpecificStep = 1;
   QMap<int, SalomeApp_IntSpinBox*>::iterator anIter;
   for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) {
-    //anIter.data()->RangeStepAndValidator(1, 999, SpecificStep);
     initSpinBox(anIter.value(), 1, 999, SpecificStep);
   }
 
@@ -576,28 +575,28 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects)
 
   GEOM::GEOM_Object_var anObj;
 
+  GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation());
+
   switch (getConstructorId()) {
   case 0:
-    anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->
-      MakeMultiTransformation1D(myShape,
-                                myFaces[Face1], myFaces[Face2],
-                                mySpinBox[SpinBox1]->value());
+    anObj = anOper->MakeMultiTransformation1D(myShape,
+                                              myFaces[Face1], myFaces[Face2],
+                                              mySpinBox[SpinBox1]->value());
     if (!anObj->_is_nil() && !IsPreview())
     {
       QStringList aParameters;
       aParameters << "" << "";
       aParameters << mySpinBox[SpinBox1]->text();
-      anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
     }
     res = true;
     break;
   case 1:
-    anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->
-      MakeMultiTransformation2D (myShape,
-                                 myFaces[Face1U], myFaces[Face2U],
-                                 mySpinBox[SpinBox2U]->value(),
-                                 myFaces[Face1V], myFaces[Face2V],
-                                 mySpinBox[SpinBox2V]->value());
+    anObj = anOper->MakeMultiTransformation2D (myShape,
+                                               myFaces[Face1U], myFaces[Face2U],
+                                               mySpinBox[SpinBox2U]->value(),
+                                               myFaces[Face1V], myFaces[Face2V],
+                                               mySpinBox[SpinBox2V]->value());
     if (!anObj->_is_nil() && !IsPreview())
     {
       QStringList aParameters;
@@ -605,7 +604,7 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects)
       aParameters << mySpinBox[SpinBox2U]->text();
       aParameters << "" << "";
       aParameters << mySpinBox[SpinBox2V]->text();
-      anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
     }
     res = true;
     break;