Salome HOME
Improve actions management
[modules/geom.git] / src / OperationGUI / OperationGUI_ArchimedeDlg.cxx
index fdf1778e3e1ea4b340f01fa12eb3f5d029cf59cd..3da8378c8659e696af0845259e3fc0243812eda4 100644 (file)
@@ -123,13 +123,14 @@ void OperationGUI_ArchimedeDlg::Init()
   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
   
   connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
-          this, SLOT( SelectionIntoArgument() ) );
+           this, SLOT( SelectionIntoArgument() ) );
   
   initName( tr( "GEOM_ARCHIMEDE" ) );
   
   globalSelection( GEOM_ALLSHAPES );
 
   SelectionIntoArgument();
+  resize(100,100);
 }
 
 
@@ -219,7 +220,7 @@ void OperationGUI_ArchimedeDlg::ActivateThisDialog()
   GEOMBase_Skeleton::ActivateThisDialog();
   globalSelection( GEOM_ALLSHAPES );
   connect( myGeomGUI->getApp()->selectionMgr(),
-          SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
 }
 
 
@@ -263,14 +264,12 @@ bool OperationGUI_ArchimedeDlg::isValid( QString& msg )
 //=================================================================================
 bool OperationGUI_ArchimedeDlg::execute( ObjectList& objects )
 {
-  GEOM::GEOM_Object_var anObj;
-
   double aWeight         = GroupPoints->SpinBox_DX->value();
   double aWaterDensity   = GroupPoints->SpinBox_DY->value();
   double aMeshDeflection = GroupPoints->SpinBox_DZ->value();
   
-  anObj = GEOM::GEOM_ILocalOperations::_narrow(
-    getOperation() )->MakeArchimede( myShape, aWeight, aWaterDensity, aMeshDeflection );
+  GEOM::GEOM_ILocalOperations_var anOper = GEOM::GEOM_ILocalOperations::_narrow(getOperation());
+  GEOM::GEOM_Object_var anObj = anOper->MakeArchimede( myShape, aWeight, aWaterDensity, aMeshDeflection );
 
   if ( !anObj->_is_nil() )
   {
@@ -280,7 +279,7 @@ bool OperationGUI_ArchimedeDlg::execute( ObjectList& objects )
       aParameters << GroupPoints->SpinBox_DX->text();
       aParameters << GroupPoints->SpinBox_DY->text();
       aParameters << GroupPoints->SpinBox_DZ->text();
-      anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
     }
     objects.push_back( anObj._retn() );
   }