X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Mesh.cxx;h=a3e707247e2c920bd2fdbcdac14250e3cc28b802;hp=094dd4fee537e9492d7cb87778e3eecfceef6bad;hb=81bd0885814f1219569c20815ebcaf7346705dbc;hpb=7ee75034e28413772c7f45759d8633759a172b45;ds=sidebyside diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 094dd4fee..a3e707247 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -1242,24 +1242,35 @@ void SMESH_Mesh::NotifySubMeshesHypothesisModification(const SMESH_Hypothesis* h } } if ( toNotify ) + { smToNotify.push_back( aSubMesh ); - - if ( !aSubMesh->IsEmpty() && - aSubMesh->GetSubShape().ShapeType() == TopAbs_EDGE && - !toNotify ) - allMeshedEdgesNotified = false; + if ( aSubMesh->GetAlgoState() == SMESH_subMesh::MISSING_HYP ) + allMeshedEdgesNotified = false; // update of algo state needed, not mesh clearing + } + else + { + if ( !aSubMesh->IsEmpty() && + aSubMesh->GetSubShape().ShapeType() == TopAbs_EDGE ) + allMeshedEdgesNotified = false; + } } + if ( smToNotify.empty() ) + return; // if all meshed EDGEs will be notified then the notification is equivalent // to the whole mesh clearing if ( allMeshedEdgesNotified ) - Clear(); + { + if ( NbNodes() > 0 ) + Clear(); + } else + { // notify in reverse order to avoid filling of the pool of IDs for ( int i = smToNotify.size()-1; i >= 0; --i ) smToNotify[i]->AlgoStateEngine(SMESH_subMesh::MODIF_HYP, const_cast< SMESH_Hypothesis*>( hyp )); - + } HasModificationsToDiscard(); // to reset _isModified flag if mesh becomes empty GetMeshDS()->Modified(); }