Salome HOME
Switch to SSL mode for tests : naive approach
[modules/geom.git] / src / RepairGUI / RepairGUI_GlueDlg.cxx
index 3d9c5cc1d425ba4093d46255e540f1063b96bafe..1b6fc536abe28920201f005be75d0617c2cab461 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  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
@@ -165,6 +165,8 @@ RepairGUI_GlueDlg::RepairGUI_GlueDlg(GeometryGUI* theGeometryGUI, QWidget* paren
         aHelpFileName = "glue_faces_operation_page.html";
         break;
       }
+    default:
+      break;
   }
   setHelpFileName(aHelpFileName);
 
@@ -408,7 +410,7 @@ void RepairGUI_GlueDlg::enterEvent(QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr RepairGUI_GlueDlg::createOperation()
 {
-  return getGeomEngine()->GetIShapesOperations(getStudyId());
+  return getGeomEngine()->GetIShapesOperations();
 }
 
 //=================================================================================
@@ -462,7 +464,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects)
       {
         QStringList aParameters;
         aParameters << myTolEdt->text();
-        anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+        anObj->SetParameters(aParameters.join(":").toUtf8().constData());
 
         objects.push_back(anObj._retn());
       }
@@ -521,7 +523,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects)
         if (!IsPreview()) {
           QStringList aParameters;
           aParameters << myTolEdt2->text();
-          anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+          anObj->SetParameters(aParameters.join(":").toUtf8().constData());
         }
         objects.push_back(anObj._retn());
       }
@@ -542,8 +544,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr   theStudy,
-                                          SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_GlueDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     GEOM::find_shape_method aFindMethod = GEOM::FSM_GetInPlace;
@@ -551,7 +552,7 @@ void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr   theStudy,
       aFindMethod = GEOM::FSM_GetInPlaceByHistory;
 
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          aFindMethod, /*theInheritFirstArg=*/true,
                                          mainFrame()->CheckBoxAddPrefix->isChecked());
   }
@@ -592,7 +593,7 @@ void RepairGUI_GlueDlg::clearShapeBufferLocal(GEOM::GEOM_Object_ptr theObj)
 //================================================================
 // Function : onAccept
 // Purpose  : This method should be called from dialog's slots onOk() and onApply()
-//            It perfroms user input validation, then it
+//            It performs user input validation, then it
 //            performs a proper operation and manages transactions, etc.
 //================================================================
 bool RepairGUI_GlueDlg::onAcceptLocal()
@@ -615,8 +616,6 @@ bool RepairGUI_GlueDlg::onAcceptLocal()
     return false;
   }
 
-  erasePreview(false);
-
   try {
     if (openCommand()) {
       SUIT_OverrideCursor wc;
@@ -643,7 +642,7 @@ bool RepairGUI_GlueDlg::onAcceptLocal()
             if (aName.isEmpty())
               aName = GEOMBase::GetDefaultName(getPrefix(*it));
           }
-          addInStudy(*it, aName.toLatin1().data());
+          addInStudy(*it, aName.toUtf8().data());
           display(*it, false);
         }
 
@@ -672,6 +671,8 @@ bool RepairGUI_GlueDlg::onAcceptLocal()
     abortCommand();
   }
 
+  erasePreview(false);
+
   updateViewer();
   activateSelection();
   updateButtonState();