-// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
try {
CORBA::String_var error;
res = aMesh->AddHypothesis(aShapeObject, aHyp, error.out());
+ UpdateViewer(aMesh);
if (res > SMESH::HYP_OK) {
wc.suspend();
processHypothesisStatus(res, aHyp, true, error.in() );
{
CORBA::String_var error;
res = aMesh->AddHypothesis( aShapeObject, aHyp, error.out() );
+ UpdateViewer(aMesh);
if (res > SMESH::HYP_OK) {
wc.suspend();
processHypothesisStatus( res, aHyp, true, error.in() );
processHypothesisStatus(res, anHyp, false);
wc.resume();
}
- if ( _PTR(SObject) meshSO = SMESH::FindSObject(aMesh) )
- {
- if ( SMESH_Actor* actor = SMESH::FindActorByEntry( meshSO->GetID().c_str() ))
- if( actor->GetVisibility() )
- actor->Update();
- }
+ UpdateViewer(aMesh);
}
} catch(const SALOME::SALOME_Exception& S_ex) {
wc.suspend();
}
}
return res < SMESH::HYP_UNKNOWN_FATAL;
+ }
+
+ void UpdateViewer(SMESH::SMESH_Mesh_ptr theMesh)
+ {
+ if (_PTR(SObject) meshSO = SMESH::FindSObject(theMesh))
+ {
+ if (SMESH_Actor* actor = SMESH::FindActorByEntry(meshSO->GetID().c_str()))
+ if (actor->GetVisibility())
+ actor->Update();
+ }
}
SObjectList GetMeshesUsingAlgoOrHypothesis(SMESH::SMESH_Hypothesis_ptr AlgoOrHyp)