X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_ShapeByMeshDlg.cxx;h=a89bc1935909364b1e3b9ea247c42a98d83845d1;hp=511d0d5fa446b4be88354d55dda8202c341c082f;hb=dcfc66bbfa976f8fa007dfdadd13a72b5e438cd4;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef diff --git a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx index 511d0d5fa..a89bc1935 100644 --- a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 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 @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -331,7 +331,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() TopAbs_ShapeEnum aGroupType = TopAbs_SHAPE; - std::map aGeomObjectsMap; + std::map aGeomObjectsMap; GEOM::GEOM_Object_wrap aGeomObject; GEOM::GEOM_Object_var aMeshShape = myMesh->GetShapeToMesh(); @@ -343,7 +343,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() if (aGeomObject->_is_nil()) continue; - double anId = aShapesOp->GetSubShapeIndex(aMeshShape, aGeomObject); + int anId = aShapesOp->GetSubShapeIndex(aMeshShape, aGeomObject); if (aShapesOp->IsDone() && !aGeomObjectsMap.count(anId) ) { aGeomObjectsMap[anId] = aGeomObject; @@ -372,13 +372,13 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() aGeomObjects->length( aNumberOfGO ); int i = 0; - std::map::iterator anIter; + std::map::iterator anIter; for (anIter = aGeomObjectsMap.begin(); anIter!=aGeomObjectsMap.end(); anIter++) - aGeomObjects[i++] = (*anIter).second.in(); + aGeomObjects[i++] = GEOM::GEOM_Object::_duplicate( (*anIter).second.in() ); //create geometry group aGeomObject = aGroupOp->CreateGroup(aMeshShape, aGroupType); - aGroupOp->UnionList(myGeomObj, aGeomObjects); + aGroupOp->UnionList(aGeomObject, aGeomObjects); if (!aGroupOp->IsDone()) return; @@ -420,7 +420,7 @@ void SMESHGUI_ShapeByMeshOp::onSelectionDone() try { SALOME_ListIO aList; - selectionMgr()->selectedObjects(aList, SVTK_Viewer::Type()); + selectionMgr()->selectedObjects(aList); if (!myIsMultipleAllowed && aList.Extent() != 1) return;