Salome HOME
Task #3237: Allow usage of accented characters in ObjectBrowser
[modules/shaper.git] / src / PartSet / PartSet_Validators.cpp
index 76c8e61566cd287be78bc273012f5560eaae313a..da53f90fc677eb1740733e9b8d3b0123eed596f0 100644 (file)
@@ -53,6 +53,8 @@
 #include <SketchPlugin_Point.h>
 #include <GeomAPI_Edge.h>
 
+#include <Locale_Convert.h>
+
 #include <list>
 #include <unordered_map>
 #ifdef _DEBUG
@@ -436,7 +438,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
           if (isObject) {
             if (aRef->object() == anObject) {
               theError = errorMessage(EqualObjects,
-                anObject.get() ? ModelAPI_Tools::toString(anObject->data()->name()) : "",
+                anObject.get() ? Locale::Convert::toString(anObject->data()->name()) : "",
                 theAttribute->id(), aRef->id());
               return false;
             }
@@ -514,7 +516,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
           // check the object is already presented
           if (aRef->value() == anObject) {
             theError = errorMessage(EqualObjects,
-              anObject.get() ? ModelAPI_Tools::toString(anObject->data()->name()) : "",
+              anObject.get() ? Locale::Convert::toString(anObject->data()->name()) : "",
               theAttribute->id(), aRef->id());
             return false;
           }
@@ -611,7 +613,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
               if (aCurSelObject == aRefSelList->object(j)) {
                 theError = errorMessage(EqualObjects,
                   aCurSelObject.get()?
-                  ModelAPI_Tools::toString(aCurSelObject->data()->name()) : "",
+                  Locale::Convert::toString(aCurSelObject->data()->name()) : "",
                   theAttribute->id(), aCurSelList->id());
                 return false;
               }