Salome HOME
Improve actions management
[modules/geom.git] / src / PrimitiveGUI / PrimitiveGUI_CylinderDlg.cxx
index b77bd11a36ee62b7b0373fb1d973e232e02efe79..a316c5ddc3cc0735989406461736b784eb1963ad 100644 (file)
@@ -397,7 +397,7 @@ void PrimitiveGUI_CylinderDlg::ActivateThisDialog()
   GEOMBase_Skeleton::ActivateThisDialog();
 
   connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
-          this, SLOT( SelectionIntoArgument() ) );
+           this, SLOT( SelectionIntoArgument() ) );
 
   ConstructorsClicked( getConstructorId() );
 }
@@ -461,30 +461,30 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects)
 
   GEOM::GEOM_Object_var anObj;
 
+  GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
+
   switch (getConstructorId()) {
   case 0:
     if (!CORBA::is_nil(myPoint) && !CORBA::is_nil(myDir)) {
-      anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
-        MakeCylinderPntVecRH(myPoint, myDir, getRadius(), getHeight());
+      anObj = anOper->MakeCylinderPntVecRH(myPoint, myDir, getRadius(), getHeight());
       if (!anObj->_is_nil() && !IsPreview())
       {
-       QStringList aParameters;
-       aParameters << GroupPoints->SpinBox_DX->text();
-       aParameters << GroupPoints->SpinBox_DY->text();
-       anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+        QStringList aParameters;
+        aParameters << GroupPoints->SpinBox_DX->text();
+        aParameters << GroupPoints->SpinBox_DY->text();
+        anObj->SetParameters(aParameters.join(":").toLatin1().constData());
       }
       res = true;
     }
     break;
   case 1:
-    anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
-      MakeCylinderRH(getRadius(), getHeight());
+    anObj = anOper->MakeCylinderRH(getRadius(), getHeight());
     if (!anObj->_is_nil() && !IsPreview())
     {
       QStringList aParameters;
       aParameters << GroupDimensions->SpinBox_DX->text();
       aParameters << GroupDimensions->SpinBox_DY->text();
-      anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
     }
     res = true;
     break;