Salome HOME
54250: Wrong group contents after SplitQuad()
[modules/smesh.git] / src / SMESH_I / SMESH_Group_i.cxx
index d9c4b0961d208e34d40bcacc65d9bff6804a6e37..d580262ded1d33b8a9dc214ee0e14d6ed3e21475 100644 (file)
@@ -474,8 +474,9 @@ SMESH::long_array* SMESH_GroupBase_i::GetListOfID()
   {
     int aSize = aGroupDS->Extent();
     aRes->length(aSize);
-    for (int i = 0; i < aSize; i++)
-      aRes[i] = aGroupDS->GetID(i+1);
+    SMDS_ElemIteratorPtr it = aGroupDS->GetElements();
+    for (int i = 0; it->more(); i++)
+      aRes[i] = it->next()->GetID();
 
     if ( 0 < aSize && aSize < 100 ) // for comfortable testing ;)
       std::sort( &aRes[0], &aRes[0]+aSize );