Salome HOME
bos #16700 [EDF] GEOM : Import python file after dump of explode structure from XAO...
[modules/geom.git] / src / TransformationGUI / TransformationGUI_MultiRotationDlg.cxx
index fd999a60f4a480a1732ddebaa4c7a61cf2585216..8c7b5239efb63ec915e0f8a7f86845765e657100 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019  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
@@ -268,7 +268,7 @@ void TransformationGUI_MultiRotationDlg::SelectionIntoArgument()
       myBase = aSelectedObject;
 
       // recompute myAng and myStep (Mantis issue 0021718)
-      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations(getStudyId());
+      GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations();
       double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax;
       anOper->GetBoundingBox(myBase.get(), true, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax);
       if (anOper->IsDone()) {
@@ -330,7 +330,7 @@ void TransformationGUI_MultiRotationDlg::SetEditCurrentArgument()
   else if (send == GroupArgs->PushButton2) {
     myEditCurrentArgument = GroupArgs->LineEdit2;
 
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+    localSelection(TopAbs_EDGE);
 
     GroupArgs->PushButton1->setDown(false);
     GroupArgs->LineEdit1->setEnabled(false);
@@ -449,7 +449,7 @@ void TransformationGUI_MultiRotationDlg::CheckAngleStep (bool isOn)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr TransformationGUI_MultiRotationDlg::createOperation()
 {
-  return getGeomEngine()->GetITransformOperations(getStudyId());
+  return getGeomEngine()->GetITransformOperations();
 }
 
 //=================================================================================
@@ -527,7 +527,7 @@ bool TransformationGUI_MultiRotationDlg::execute (ObjectList& objects)
 
   if (!anObj->_is_nil()) {
     if (!IsPreview())
-      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+      anObj->SetParameters(aParameters.join(":").toUtf8().constData());
     objects.push_back(anObj._retn());
   }
 
@@ -550,12 +550,22 @@ void TransformationGUI_MultiRotationDlg::addSubshapesToStudy()
   }
 }
 
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> TransformationGUI_MultiRotationDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res;
+  res << myBase << myVector;
+  return res;
+}
+
 //=================================================================================
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                           SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // we pass here the first operation argument (object) through the list of arguments
@@ -564,7 +574,7 @@ void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::Study_ptr
     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
     anArgs->length(1);
     anArgs[0] = myBase.copy();
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+    getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_MultiTransformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());