mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +05:00
PAL8196. Fix GetAlgo() for the case with the same algo on several ancestors
This commit is contained in:
parent
9de295a1ec
commit
c24470c4ac
@ -602,8 +602,14 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
|
||||
|
||||
list <const SMESHDS_Hypothesis * > algoList;
|
||||
aMesh.GetHypotheses( aShape, filter, algoList, true );
|
||||
if (algoList.size() != 1 )
|
||||
return NULL;
|
||||
|
||||
if (algoList.size() != 1 ) { // check if there is one algo several times
|
||||
list <const SMESHDS_Hypothesis * >::iterator algo = algoList.begin();
|
||||
for ( ; algo != algoList.end(); ++algo )
|
||||
if ( (*algo) != algoList.front() &&
|
||||
(*algo)->GetName() != algoList.front()->GetName() )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return const_cast<SMESH_Algo*> ( static_cast<const SMESH_Algo* >( algoList.front() ));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user