]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Bug IPAL20034 Error after Find geometry by mesh element selection,if element is selec...
authordmv <dmv@opencascade.com>
Tue, 15 Jul 2008 06:20:48 +0000 (06:20 +0000)
committerdmv <dmv@opencascade.com>
Tue, 15 Jul 2008 06:20:48 +0000 (06:20 +0000)
src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx

index 51881af4282140a591d5109dd4ba967b1a5632c1..5a506dab47727862aed8f983fca50f9847a28a7c 100644 (file)
@@ -288,8 +288,9 @@ void SMESHGUI_ShapeByMeshOp::commitOperation()
     if (aListId.count() == 1)
       {
        int elemID = (aListId.first()).toInt();
-       myGeomObj = SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement
-         ( myMesh.in(), elemID, myDlg->myGeomName->text().latin1());
+       myGeomObj = GEOM::GEOM_Object::_duplicate(
+           SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement
+         ( myMesh.in(), elemID, myDlg->myGeomName->text().latin1()) );
       }
     else
       {
@@ -361,7 +362,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation()
        QString aNewGeomGroupName ( myDlg->myGeomName->text().latin1() );
          
        SALOMEDS::SObject_var aNewGroupSO =
-         geomGen->AddInStudy(SMESHGUI::GetSMESHGen()->GetCurrentStudy(), myGeomObj, aNewGeomGroupName, aMeshShape);
+       geomGen->AddInStudy(SMESHGUI::GetSMESHGen()->GetCurrentStudy(), myGeomObj, aNewGeomGroupName, aMeshShape);
       }
   }
   catch (const SALOME::SALOME_Exception& S_ex) {