PAL8170: Provide unique names for groups on SubMesh

This commit is contained in:
jfa 2005-02-14 13:03:59 +00:00
parent fb7bf211bb
commit d9c93f6f32

View File

@ -1527,19 +1527,19 @@ bool SMESHGUI::OnGUIEvent(int theCommandID, QAD_Desktop * parent)
// create group for each type o elements // create group for each type o elements
QString aName = IObject->getName(); QString aName = IObject->getName();
if (aNodes->length() > 0) { if (aNodes->length() > 0) {
SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::NODE, aName); SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::NODE, aName + "_Nodes");
aGroup->Add(aNodes.inout()); aGroup->Add(aNodes.inout());
} }
if (aEdges->length() > 0) { if (aEdges->length() > 0) {
SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::EDGE, aName); SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::EDGE, aName + "_Edges");
aGroup->Add(aEdges.inout()); aGroup->Add(aEdges.inout());
} }
if (aFaces->length() > 0) { if (aFaces->length() > 0) {
SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::FACE, aName); SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::FACE, aName + "_Faces");
aGroup->Add(aFaces.inout()); aGroup->Add(aFaces.inout());
} }
if (aVolumes->length() > 0) { if (aVolumes->length() > 0) {
SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::VOLUME, aName); SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::VOLUME, aName + "_Volumes");
aGroup->Add(aVolumes.inout()); aGroup->Add(aVolumes.inout());
} }
myActiveStudy->updateObjBrowser(true); myActiveStudy->updateObjBrowser(true);