]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0020555: EDF GEOM: MakeSketcher and localisation
authordmv <dmv@opencascade.com>
Tue, 27 Oct 2009 13:29:27 +0000 (13:29 +0000)
committerdmv <dmv@opencascade.com>
Tue, 27 Oct 2009 13:29:27 +0000 (13:29 +0000)
src/GEOMImpl/GEOMImpl_SketcherDriver.cxx

index 6642592d15f208330405e4fa44c5555a7af29708..8d477f541ec37577206c59f3cfde79a58e6fcdd1 100644 (file)
@@ -78,9 +78,16 @@ Standard_Integer GEOMImpl_SketcherDriver::Execute(TFunction_Logbook& log) const
 
   TopoDS_Shape aShape;
 
+  // Set "C" numeric locale to save numbers correctly
+  std::string aCurLocale = setlocale(LC_NUMERIC, 0);
+  setlocale(LC_NUMERIC, "C");
+
   // create sketcher
   Sketcher_Profile aProfile (aCommand.ToCString());
 
+  // Return previous locale
+  setlocale(LC_NUMERIC, aCurLocale.data());
+
   if (!aProfile.IsDone()) {
     Standard_ConstructionError::Raise("Sketcher creation failed");
   }