Salome HOME
Preparation of intermediate revision
[modules/geom.git] / src / BasicGUI / BasicGUI_VectorDlg.cxx
index 23a1a8492bf73ab79c6e4ad6330939ee18aebf55..612557ff2ab22d26c5852248f64ab9dc3966125b 100644 (file)
@@ -32,6 +32,7 @@
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Session.h>
 #include <SalomeApp_Application.h>
+#include <SalomeApp_Notebook.h>
 #include <LightApp_SelectionMgr.h>
 
 #include <TopoDS_Shape.hxx>
@@ -476,10 +477,12 @@ bool BasicGUI_VectorDlg::execute( ObjectList& objects )
 
   GEOM::GEOM_Object_var anObj;
 
+  GEOM::GEOM_IBasicOperations_var anOper = GEOM::GEOM_IBasicOperations::_narrow( getOperation() );
+
   switch ( getConstructorId() ) {
   case 0 :
     {
-      anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorTwoPnt( myPoint1, myPoint2 );
+      anObj = anOper->MakeVectorTwoPnt( myPoint1, myPoint2 );
       res = true;
       break;
     }
@@ -489,14 +492,13 @@ bool BasicGUI_VectorDlg::execute( ObjectList& objects )
       double dy = GroupDimensions->SpinBox_DY->value();
       double dz = GroupDimensions->SpinBox_DZ->value();
       
-      QStringList aParameters;
-      aParameters << GroupDimensions->SpinBox_DX->text();
-      aParameters << GroupDimensions->SpinBox_DY->text();
-      aParameters << GroupDimensions->SpinBox_DZ->text();
-      anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorDXDYDZ( dx, dy, dz );
+      anObj = anOper->MakeVectorDXDYDZ( dx, dy, dz );
 
       if ( !anObj->_is_nil() && !IsPreview() )
-        anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+        myNoteBook->setParameters(anObj, 3,
+                                  GroupDimensions->SpinBox_DX,
+                                  GroupDimensions->SpinBox_DY,
+                                  GroupDimensions->SpinBox_DZ);
       
       res = true;
       break;