Salome HOME
[bos #29933] [CEA 29931] Redundant constraint in SHAPER SIGSEGV
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_MacroBSpline.cpp
index 3d3ab4c53e7c92616bb209c0ab0b0085f1fe84c9..a887c1aa61bde2e8e0e60317f109b6d629d7219e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #include <SketchPlugin_Tools.h>
 #include <SketchPlugin_Sketch.h>
 
+#include <Locale_Convert.h>
+
 #include <ModelAPI_AttributeDoubleArray.h>
 #include <ModelAPI_AttributeInteger.h>
 #include <ModelAPI_AttributeRefAttrList.h>
 #include <ModelAPI_Events.h>
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Validator.h>
+#include <ModelAPI_Tools.h>
 
 #include <GeomDataAPI_Point2DArray.h>
 
@@ -266,10 +269,10 @@ void SketchPlugin_MacroBSpline::assignDefaultNameForAux(FeaturePtr theAuxFeature
 {
   FeaturePtr aBSpline = ModelAPI_Feature::feature(theBSplinePoles->owner());
 
-  std::ostringstream aName;
+  std::wostringstream aName;
   aName << aBSpline->name();
   if (theAuxFeature->getKind() == SketchPlugin_Point::ID())
-    aName << "_" << theBSplinePoles->id() << "_" << thePoleIndex1;
+    aName << "_" << Locale::Convert::toWString(theBSplinePoles->id()) << "_" << thePoleIndex1;
   else
     aName << "_segment_" << thePoleIndex1 << "_" << thePoleIndex2;