-
- for (int i=0; i<listSOmesh->length(); i++)
- SMESH::ModifiedMesh(listSOmesh[i], false);
+
+ if ( listSOmesh.size() > 0 ) {
+ _PTR(SObject) submSO = listSOmesh[0];
+ SMESH::SMESH_Mesh_var aMesh =
+ SMESH::SObjectToInterface<SMESH::SMESH_Mesh>(submSO);
+ SMESH::SMESH_subMesh_var aSubMesh =
+ SMESH::SObjectToInterface<SMESH::SMESH_subMesh>(submSO);
+ if ( !aSubMesh->_is_nil() )
+ aMesh = aSubMesh->GetFather();
+ _PTR(SObject) meshSO = SMESH::FindSObject( aMesh );
+ SMESH::ModifiedMesh( meshSO, false);
+ }