Salome HOME
#16648 [CEA] RadialQuadrangle algorithm hypothesis change requires a Clear Mesh Data...
[modules/smesh.git] / src / SMESH / SMESH_Mesh.cxx
index 31efebf587e13dd4e861969349f617f6a688b7ef..7cc790b4442e2eaa9ff099aa3253a3b9f7842414 100644 (file)
@@ -1191,8 +1191,12 @@ void SMESH_Mesh::NotifySubMeshesHypothesisModification(const SMESH_Hypothesis* h
   if ( !GetMeshDS()->IsUsedHypothesis( hyp ))
     return;
 
-  if (_callUp && hyp)
+  bool toCallBack = true;
+  if ( _callUp && hyp && NbNodes() == 0 ) // for not loaded mesh
+  {
     _callUp->HypothesisModified( hyp->GetID() );
+    toCallBack = ( NbNodes() > 0 );
+  }
 
   SMESH_Algo *algo;
   const SMESH_HypoFilter* compatibleHypoKind;
@@ -1260,6 +1264,9 @@ void SMESH_Mesh::NotifySubMeshesHypothesisModification(const SMESH_Hypothesis* h
   }
   HasModificationsToDiscard(); // to reset _isModified flag if mesh becomes empty
   GetMeshDS()->Modified();
+
+  if ( _callUp && hyp && toCallBack )
+    _callUp->HypothesisModified( hyp->GetID() );
 }
 
 //=============================================================================