From 40681d2920bbdf6ec6b3ebced46ac3b67771e09a Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 12 Apr 2007 15:37:34 +0000 Subject: [PATCH] PAL13330( When mesh generation does not success, trace where ) - SMESH::ModifiedMesh(aMeshSO, false); + SMESH::ModifiedMesh(aMeshSO, false, aMesh->NbNodes()==0); --- src/SMESHGUI/SMESHGUI.cxx | 2 +- src/SMESHGUI/SMESHGUI_Hypotheses.cxx | 2 +- src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx | 6 +++--- src/SMESHGUI/SMESHGUI_Swig.cxx | 16 ++++++++++------ src/SMESHGUI/SMESHGUI_Swig.hxx | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index b002b987a..67032b6d6 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -868,7 +868,7 @@ using namespace std; _PTR(SObject) aMeshSO = SMESH::FindSObject(aMesh); if (aMeshSO) - SMESH::ModifiedMesh(aMeshSO, false); + SMESH::ModifiedMesh(aMeshSO, false, aMesh->NbNodes()==0); } else { IObject = new SALOME_InteractiveObject diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index b6542903a..858fa53e8 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -119,7 +119,7 @@ void SMESHGUI_GenericHypothesisCreator::edit( SMESH::SMESH_Hypothesis_ptr h, QWi if( !aSubMesh->_is_nil() ) aMesh = aSubMesh->GetFather(); _PTR(SObject) meshSO = SMESH::FindSObject( aMesh ); - SMESH::ModifiedMesh( meshSO, false); + SMESH::ModifiedMesh( meshSO, false, aMesh->NbNodes()==0); } SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 ); } diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index cc4db51a8..8f40e2b85 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -410,7 +410,7 @@ namespace SMESH{ if (res < SMESH::HYP_UNKNOWN_FATAL) { _PTR(SObject) aSH = SMESH::FindSObject(aHyp); if (SM && aSH) { - SMESH::ModifiedMesh(SM, false); + SMESH::ModifiedMesh(SM, false, aMesh->NbNodes()==0); } } if (res > SMESH::HYP_OK) { @@ -445,7 +445,7 @@ namespace SMESH{ if (res < SMESH::HYP_UNKNOWN_FATAL) { _PTR(SObject) meshSO = SMESH::FindSObject(aMesh); if (meshSO) - SMESH::ModifiedMesh(meshSO, false); + SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0); } if (res > SMESH::HYP_OK) { wc.suspend(); @@ -531,7 +531,7 @@ namespace SMESH{ if (res < SMESH::HYP_UNKNOWN_FATAL) { _PTR(SObject) meshSO = SMESH::FindSObject(aMesh); if (meshSO) - SMESH::ModifiedMesh(meshSO, false); + SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0); } if (res > SMESH::HYP_OK) { wc.suspend(); diff --git a/src/SMESHGUI/SMESHGUI_Swig.cxx b/src/SMESHGUI/SMESHGUI_Swig.cxx index c1912cab2..fec084979 100644 --- a/src/SMESHGUI/SMESHGUI_Swig.cxx +++ b/src/SMESHGUI/SMESHGUI_Swig.cxx @@ -633,20 +633,23 @@ SMESH_Swig::SetName(const char* theEntry, //================================================================================ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry, - const bool theIsComputed) + const bool theIsComputed, + const bool isEmpty) { class TEvent: public SALOME_Event { SALOMEDS::Study_var myStudy; std::string myMeshEntry; - bool myIsComputed; + bool myIsComputed, myIsEmpty; public: TEvent(const SALOMEDS::Study_var& theStudy, const std::string& theMeshEntry, - const bool theIsComputed): + const bool theIsComputed, + const bool isEmpty): myStudy(theStudy), myMeshEntry(theMeshEntry), - myIsComputed(theIsComputed) + myIsComputed(theIsComputed), + myIsEmpty(isEmpty) {} virtual @@ -656,11 +659,12 @@ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry, SALOMEDS::SObject_var aMeshSO = myStudy->FindObjectID(myMeshEntry.c_str()); if(!aMeshSO->_is_nil()) if(_PTR(SObject) aMesh = ClientFactory::SObject(aMeshSO)) - SMESH::ModifiedMesh(aMesh,myIsComputed); + SMESH::ModifiedMesh(aMesh,myIsComputed,myIsEmpty); } }; ProcessVoidEvent(new TEvent(myStudy, theMeshEntry, - theIsComputed)); + theIsComputed, + isEmpty)); } diff --git a/src/SMESHGUI/SMESHGUI_Swig.hxx b/src/SMESHGUI/SMESHGUI_Swig.hxx index 433f3c862..c67876090 100644 --- a/src/SMESHGUI/SMESHGUI_Swig.hxx +++ b/src/SMESHGUI/SMESHGUI_Swig.hxx @@ -66,7 +66,7 @@ public: * \param Mesh_Entry - entry of a mesh * \param isComputed - is mesh computed or not */ - void SetMeshIcon(const char* Mesh_Entry, const bool isComputed); + void SetMeshIcon(const char* Mesh_Entry, const bool isComputed, const bool isEmpty); private: SALOMEDS::Study_var myStudy; -- 2.39.2