]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelAPI/ModelAPI_Tools.cpp
Salome HOME
Issue #3237: Allow usage of accented characters in ObjectBrowser
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.cpp
index e3b007bb84872f735ce7459170f441e063aedb72..69a882af62a66593745301585c3a47b7b5006a77 100644 (file)
@@ -171,12 +171,11 @@ std::string getFeatureError(const FeaturePtr& theFeature)
 // LCOV_EXCL_STOP
 
 ObjectPtr objectByName(const DocumentPtr& theDocument, const std::string& theGroup,
-                       const std::string& theName)
+                       const std::wstring& theName)
 {
-  std::wstring aName = Locale::Convert::toWString(theName);
   for (int anIndex = 0; anIndex < theDocument->size(theGroup); ++anIndex) {
     ObjectPtr anObject = theDocument->object(theGroup, anIndex);
-    if (anObject->data()->name() == aName)
+    if (anObject->data()->name() == theName)
       return anObject;
   }
   // not found
@@ -184,7 +183,7 @@ ObjectPtr objectByName(const DocumentPtr& theDocument, const std::string& theGro
 }
 
 bool findVariable(const DocumentPtr& theDocument, FeaturePtr theSearcher,
-                  const std::string& theName, double& outValue, ResultParameterPtr& theParam)
+                  const std::wstring& theName, double& outValue, ResultParameterPtr& theParam)
 {
   ObjectPtr aParamObj = objectByName(theDocument, ModelAPI_ResultParameter::group(), theName);
   theParam = std::dynamic_pointer_cast<ModelAPI_ResultParameter>(aParamObj);
@@ -202,7 +201,7 @@ bool findVariable(const DocumentPtr& theDocument, FeaturePtr theSearcher,
   return true;
 }
 
-bool findVariable(FeaturePtr theSearcher, const std::string& theName, double& outValue,
+bool findVariable(FeaturePtr theSearcher, const std::wstring& theName, double& outValue,
                   ResultParameterPtr& theParam, const DocumentPtr& theDocument)
 {
   SessionPtr aSession = ModelAPI_Session::get();