Salome HOME
Fix memory leaks
[modules/geom.git] / src / BasicGUI / BasicGUI_MarkerDlg.cxx
index ecd49f54831710b55cbd895c92c97470c770e909..6c1ff31b9f6c11c906b956b98d6f3f5ca5b3d1c8 100644 (file)
@@ -205,7 +205,7 @@ void BasicGUI_MarkerDlg::Init()
   double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
 
   for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter ) {
-    initSpinBox( anIter.value(), COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
+    initSpinBox( anIter.value(), COORD_MIN, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
     connect( anIter.value(), SIGNAL( valueChanged( double ) ),
              this, SLOT( onValueChanged( double ) ) );
   }
@@ -720,10 +720,16 @@ bool BasicGUI_MarkerDlg::isValid( QString& msg )
 //=================================================================================
 bool BasicGUI_MarkerDlg::execute( ObjectList& objects )
 {
-  GEOM::GEOM_Object_var anObj = GEOM::GEOM_IBasicOperations::_narrow(
-    getOperation() )->MakeMarker( myData[ X   ]->value(), myData[ Y   ]->value(), myData[ Z   ]->value(),
-                                  myData[ DX1 ]->value(), myData[ DY1 ]->value(), myData[ DZ1 ]->value(),
-                                  myData[ DX2 ]->value(), myData[ DY2 ]->value(), myData[ DZ2 ]->value() );
+  GEOM::GEOM_IBasicOperations_var anOper = GEOM::GEOM_IBasicOperations::_narrow( getOperation() );
+  GEOM::GEOM_Object_var anObj = anOper->MakeMarker( myData[ X   ]->value(), 
+                                                   myData[ Y   ]->value(), 
+                                                   myData[ Z   ]->value(),
+                                                   myData[ DX1 ]->value(),
+                                                   myData[ DY1 ]->value(), 
+                                                   myData[ DZ1 ]->value(),
+                                                   myData[ DX2 ]->value(),
+                                                   myData[ DY2 ]->value(),
+                                                   myData[ DZ2 ]->value() );
   QStringList aParameters;
   aParameters<<myData[X]->text();
   aParameters<<myData[Y]->text();
@@ -737,7 +743,7 @@ bool BasicGUI_MarkerDlg::execute( ObjectList& objects )
   
   if ( !anObj->_is_nil() ) {
     if ( !IsPreview() )
-      anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
     objects.push_back( anObj._retn() );
   }