Salome HOME
Copyright update 2022
[modules/smesh.git] / src / StdMeshersGUI / StdMeshersGUI_CartesianParamCreator.cxx
index f1271c105c6428878aed755641743123af900d68..363e04e2fbda9f1a22ca22b6e02d7252589fa4ab 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  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
@@ -534,7 +534,7 @@ namespace StdMeshersGUI
   //================================================================================
 
   QWidget* LineDelegate::createEditor( QWidget*                    parent,
-                                       const QStyleOptionViewItem& opt,
+                                       const QStyleOptionViewItem& /*opt*/,
                                        const QModelIndex&          index) const
   {
     QWidget* w = 0;
@@ -955,9 +955,7 @@ QFrame* StdMeshersGUI_CartesianParamCreator::buildFrame()
   if ( !shapeEntry.isEmpty() )
   {
     // find origin
-    Handle(SALOME_InteractiveObject) io =
-      new SALOME_InteractiveObject( shapeEntry.toStdString().c_str(), "GEOM" );
-    GEOM::GEOM_Object_var geomObj = SMESH::IObjectToInterface<GEOM::GEOM_Object>( io );
+    GEOM::GEOM_Object_var geomObj = SMESH::EntryToInterface<GEOM::GEOM_Object>( shapeEntry );
     if ( GEOMBase::GetShape( geomObj, shape ) && !shape.IsNull())
     {
       Bnd_Box box;
@@ -1394,9 +1392,7 @@ void StdMeshersGUI_CartesianParamCreator::onOptimalAxes(bool)
   if ( shapeEntry.isEmpty() )
     return;
 
-  Handle(SALOME_InteractiveObject) io =
-    new SALOME_InteractiveObject( shapeEntry.toStdString().c_str(), "GEOM" );
-  GEOM::GEOM_Object_var geomObj = SMESH::IObjectToInterface<GEOM::GEOM_Object>( io );
+  GEOM::GEOM_Object_var geomObj = SMESH::EntryToInterface<GEOM::GEOM_Object>( shapeEntry );
   if ( geomObj->_is_nil() )
     return;