From: eap Date: Tue, 22 Apr 2014 14:27:56 +0000 (+0400) Subject: IPAL 21532: Preview on groups of faces and volumes on any mesh is missing X-Git-Tag: V7_4_0rc1~40 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=b5871e675dec25c0c3ea5712086cbc68f7b38e86;hp=71bd4d33442d13a79502c92209d83fb16b2d5c21 IPAL 21532: Preview on groups of faces and volumes on any mesh is missing Fix for a case of multiple element selection => group creation --- diff --git a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx index 9c63004b3..d1a2dd8b3 100644 --- a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx @@ -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;