Salome HOME
#19765 EDF 21730 - long time to load med file file with huge amount of groups
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RotationDlg.cxx
index a55c56f97601c19721d0a0ece87fb458bd05ffeb..249cc98e16f5a5f60618e227de829b20db1cf3b6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -400,7 +400,7 @@ void SMESHGUI_RotationDlg::Init (bool ResetControls)
 //=================================================================================
 bool SMESHGUI_RotationDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if( !isValid() )
@@ -446,13 +446,13 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
         if(CheckBoxMesh->isChecked()) {
           for ( int i = 0; i < myObjects.count(); i++ ) {
             SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
-            myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+            myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
             aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, false);
           }
         }
         else {
           SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
-          myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+          myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
           aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false);
         }
         break;
@@ -462,13 +462,13 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
           if(CheckBoxMesh->isChecked()) {
             for ( int i = 0; i < myObjects.count(); i++ ) {
               SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
-              myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+              myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
               groups = aMeshEditor->RotateObjectMakeGroups(myObjects[i], anAxis, anAngle);
             }
           }
           else {
             SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
-            myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+            myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
             groups = aMeshEditor->RotateMakeGroups(anElementsId, anAxis, anAngle);
           }
         }
@@ -476,13 +476,13 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
           if(CheckBoxMesh->isChecked()) {
             for ( int i = 0; i < myObjects.count(); i++ ) {
               SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
-              myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+              myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
               aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, true);
             }
           }
           else {
             SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
-            myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+            myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
             aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
           }
         }
@@ -493,9 +493,9 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
           for ( int i = 0; i < myObjects.count(); i++ ) {
             QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
             SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
-            myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+            myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
             mesh = aMeshEditor->RotateObjectMakeMesh(myObjects[i], anAxis, anAngle, makeGroups,
-                                                     aName.toLatin1().data());
+                                                     aName.toUtf8().data());
             if (!mesh->_is_nil()) {
               if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
                 anEntryList.append( aSObject->GetID().c_str() );
@@ -504,9 +504,9 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
         }
         else {
           SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
-          myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+          myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
           mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
-                                             LineEditNewMesh->text().toLatin1().data());
+                                             LineEditNewMesh->text().toUtf8().data());
           if (!mesh->_is_nil()) {
             if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
               anEntryList.append( aSObject->GetID().c_str() );