Salome HOME
Copyright update 2020
[modules/geom.git] / src / PrimitiveGUI / PrimitiveGUI_TorusDlg.cxx
index aa42252c44c58c59b479fbb1449f71ee28bd5317..e1c27819739654ece5371ea775ee0f1878c2b574 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  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
@@ -296,7 +296,7 @@ void PrimitiveGUI_TorusDlg::SetEditCurrentArgument()
     GroupPoints->LineEdit2->setEnabled(false);
 
     globalSelection(GEOM_POINT); // to break previous local selection
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+    localSelection(TopAbs_VERTEX);
   }
   else if (send == GroupPoints->PushButton2) {
     myEditCurrentArgument = GroupPoints->LineEdit2;
@@ -305,7 +305,7 @@ void PrimitiveGUI_TorusDlg::SetEditCurrentArgument()
     GroupPoints->LineEdit1->setEnabled(false);
 
     globalSelection(GEOM_LINE);  // to break previous local selection
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+    localSelection(TopAbs_EDGE);
   }
   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
           this, SLOT(SelectionIntoArgument()));
@@ -359,7 +359,7 @@ void PrimitiveGUI_TorusDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_TorusDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
@@ -404,7 +404,7 @@ bool PrimitiveGUI_TorusDlg::execute (ObjectList& objects)
         QStringList aParameters;
         aParameters << GroupPoints->SpinBox_DX->text();
         aParameters << GroupPoints->SpinBox_DY->text();
-        anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+        anObj->SetParameters(aParameters.join(":").toUtf8().constData());
       }
       res = true;
     }
@@ -416,7 +416,7 @@ bool PrimitiveGUI_TorusDlg::execute (ObjectList& objects)
       QStringList aParameters;
       aParameters << GroupDimensions->SpinBox_DX->text();
       aParameters << GroupDimensions->SpinBox_DY->text();
-      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+      anObj->SetParameters(aParameters.join(":").toUtf8().constData());
     }
     res = true;
     break;
@@ -467,3 +467,14 @@ void PrimitiveGUI_TorusDlg::addSubshapesToStudy()
     GEOMBase::PublishSubObject( myDir.get() );
   }
 }
+
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> PrimitiveGUI_TorusDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res;
+  res << myPoint << myDir;
+  return res;
+}