Salome HOME
Merge from V5_1_4_BR 07/05/2010
[modules/geom.git] / src / BuildGUI / BuildGUI_WireDlg.cxx
index 5acb5845ecfc2fd47009f1f769d38636c1db6fd7..1b930742e8073f3fdf9f0aeed4d63f3985e192c3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // GEOM GEOMGUI : GUI for Geometry component
 // File   : BuildGUI_WireDlg.cxx
 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
-
+//
 #include "BuildGUI_WireDlg.h"
 
 #include <GEOMImpl_Types.hxx>
@@ -72,7 +73,7 @@ BuildGUI_WireDlg::BuildGUI_WireDlg( GeometryGUI* theGeometryGUI, QWidget* parent
   GroupArgs->TextLabel2->setText( tr( "GEOM_TOLERANCE" ) );
   double SpecificStep = 0.0001;
   double prec = Precision::Confusion();
-  initSpinBox(GroupArgs->SpinBox_DX, prec, MAX_NUMBER, SpecificStep, 9);
+  initSpinBox(GroupArgs->SpinBox_DX, prec, MAX_NUMBER, SpecificStep, "len_tol_precision" );
   GroupArgs->SpinBox_DX->setValue(prec);
 
   QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
@@ -119,7 +120,7 @@ void BuildGUI_WireDlg::Init()
   connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
   connect( GroupArgs->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
   connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
-          SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
   
   initName( tr( "GEOM_WIRE" ) );
 }
@@ -209,7 +210,7 @@ void BuildGUI_WireDlg::ActivateThisDialog()
 {
   GEOMBase_Skeleton::ActivateThisDialog();
   connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
-          SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
   TColStd_MapOfInteger aMap;
   aMap.Add( GEOM_WIRE );
   aMap.Add( GEOM_EDGE );
@@ -252,10 +253,8 @@ bool BuildGUI_WireDlg::isValid (QString& msg)
 //=================================================================================
 bool BuildGUI_WireDlg::execute (ObjectList& objects)
 {
-  GEOM::GEOM_Object_var anObj;
-
-  anObj = GEOM::GEOM_IShapesOperations::_narrow(getOperation())->
-    MakeWire(myEdgesAndWires, GroupArgs->SpinBox_DX->value());
+  GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
+  GEOM::GEOM_Object_var anObj = anOper->MakeWire(myEdgesAndWires, GroupArgs->SpinBox_DX->value());
 
   if (!anObj->_is_nil())
     objects.push_back(anObj._retn());