Salome HOME
Avoid installing redundant files
[modules/geom.git] / src / PrimitiveGUI / PrimitiveGUI_BoxDlg.cxx
index f4b34d0fcdc31c29bc934a00f07d8fe5432191b7..9eb2fdeaa7e91c88e6467cbe38a8bc1f6bb07ee5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  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
@@ -307,7 +307,7 @@ void PrimitiveGUI_BoxDlg::SetEditCurrentArgument()
 
   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
   globalSelection(); // close local contexts, if any
-  localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+  localSelection(TopAbs_VERTEX);
   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
           this, SLOT(SelectionIntoArgument()));
 
@@ -323,7 +323,7 @@ void PrimitiveGUI_BoxDlg::ActivateThisDialog()
 {
   GEOMBase_Skeleton::ActivateThisDialog();
   if (getConstructorId() == 0) {
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+    localSelection(TopAbs_VERTEX);
     connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
             this, SLOT(SelectionIntoArgument()));
   }
@@ -355,7 +355,7 @@ void PrimitiveGUI_BoxDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr PrimitiveGUI_BoxDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
@@ -415,7 +415,7 @@ bool PrimitiveGUI_BoxDlg::execute (ObjectList& objects)
         aParameters << GroupDimensions->SpinBox_DX->text();
         aParameters << GroupDimensions->SpinBox_DY->text();
         aParameters << GroupDimensions->SpinBox_DZ->text();
-        anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+        anObj->SetParameters(aParameters.join(":").toUtf8().constData());
       }
       res = true;
     }
@@ -439,3 +439,14 @@ void PrimitiveGUI_BoxDlg::addSubshapesToStudy()
     GEOMBase::PublishSubObject( myPoint2.get() );
   }
 }
+
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> PrimitiveGUI_BoxDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res;
+  res << myPoint1 << myPoint2;
+  return res;
+}