Salome HOME
#16459 EDF 14133 - Complete Merge Nodes / Merge Elements operations
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshUtils.cxx
index 9b3d606a0b2507a3b90569116c5ca3e122b18a3c..0d5bfb73fd1aa09be969038da33d591d5795e52a 100644 (file)
@@ -64,9 +64,9 @@ namespace SMESH
   {
     QString baseName = thePostfix.isEmpty() ? 
       theBaseName : theBaseName + "_" + thePostfix;
-    if ( _PTR(Study) aStudy = GetActiveStudyDocument() ) {
+    if ( _PTR(Study) aStudy = getStudy() ) {
       QString name = baseName;
-      while ( !aStudy->FindObjectByName( name.toLatin1().data(), "SMESH" ).empty() ) {
+      while ( !aStudy->FindObjectByName( name.toUtf8().data(), "SMESH" ).empty() ) {
         int nb = 0;
         QStringList names = name.split("_", QString::KeepEmptyParts);
         if ( names.count() > 0 ) {
@@ -90,7 +90,7 @@ namespace SMESH
     QString baseName = thePostfix.isEmpty() ? 
       theBaseName : theBaseName + "_" + thePostfix;
     QString name = baseName;
-    if ( _PTR(Study) aStudy = GetActiveStudyDocument() ) {
+    if ( _PTR(Study) aStudy = getStudy() ) {
       _PTR(SObject) p = theParent;
       if ( !p ) p = aStudy->FindComponent( "SMESH" );
       if ( p ) {