From: smh Date: Mon, 19 Apr 2004 05:51:48 +0000 (+0000) Subject: Add new checks X-Git-Tag: mergeto_Event_Server_20Apr04~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ea7a26a94823fda671a18d562cc70e83f124e718;p=modules%2Fvisu.git Add new checks --- diff --git a/src/VISU_I/VISU_Gen_i.cc b/src/VISU_I/VISU_Gen_i.cc index 39edd18e..cbf11b9e 100644 --- a/src/VISU_I/VISU_Gen_i.cc +++ b/src/VISU_I/VISU_Gen_i.cc @@ -494,13 +494,14 @@ namespace VISU{ if(myMutex){ if(myStudyDocument->GetProperties()->IsLocked()) return Mesh::_nil(); Mutex mt(myMutex,qApp); - Result_i* pResult = dynamic_cast(GetServant(theResult).in()); - Mesh_i* aPresent = new Mesh_i(pResult); - if(aPresent->Create(theMeshName,theEntity) != NULL) - return aPresent->_this(); - else{ - aPresent->_remove_ref(); - return VISU::Mesh::_nil(); + if(Result_i* pResult = dynamic_cast(GetServant(theResult).in())){ + Mesh_i* aPresent = new Mesh_i(pResult); + if(aPresent->Create(theMeshName,theEntity) != NULL) + return aPresent->_this(); + else{ + aPresent->_remove_ref(); + return VISU::Mesh::_nil(); + } } } return myVisuGen->MeshOnEntity(theResult,theMeshName,theEntity); @@ -513,13 +514,14 @@ namespace VISU{ if(myMutex){ if(myStudyDocument->GetProperties()->IsLocked()) return Mesh::_nil(); Mutex mt(myMutex,qApp); - Result_i* pResult = dynamic_cast(GetServant(theResult).in()); - Mesh_i* aPresent = new Mesh_i(pResult); - if(aPresent->Create(theMeshName,theEntity,theFamilyName) != NULL) - return aPresent->_this(); - else{ - aPresent->_remove_ref(); - return VISU::Mesh::_nil(); + if(Result_i* pResult = dynamic_cast(GetServant(theResult).in())){ + Mesh_i* aPresent = new Mesh_i(pResult); + if(aPresent->Create(theMeshName,theEntity,theFamilyName) != NULL) + return aPresent->_this(); + else{ + aPresent->_remove_ref(); + return VISU::Mesh::_nil(); + } } } return myVisuGen->FamilyMeshOnEntity(theResult,theMeshName,theEntity,theFamilyName); @@ -531,13 +533,14 @@ namespace VISU{ if(myMutex){ if(myStudyDocument->GetProperties()->IsLocked()) return Mesh::_nil(); Mutex mt(myMutex,qApp); - Result_i* pResult = dynamic_cast(GetServant(theResult).in()); - Mesh_i* aPresent = new Mesh_i(pResult); - if(aPresent->Create(theMeshName,theGroupName) != NULL) - return aPresent->_this(); - else{ - aPresent->_remove_ref(); - return VISU::Mesh::_nil(); + if(Result_i* pResult = dynamic_cast(GetServant(theResult).in())){ + Mesh_i* aPresent = new Mesh_i(pResult); + if(aPresent->Create(theMeshName,theGroupName) != NULL) + return aPresent->_this(); + else{ + aPresent->_remove_ref(); + return VISU::Mesh::_nil(); + } } } return myVisuGen->GroupMesh(theResult,theMeshName,theGroupName); diff --git a/src/VISU_I/VISU_Gen_i.hh b/src/VISU_I/VISU_Gen_i.hh index 5aa3f453..529514c7 100644 --- a/src/VISU_I/VISU_Gen_i.hh +++ b/src/VISU_I/VISU_Gen_i.hh @@ -75,13 +75,14 @@ namespace VISU{ typename TPrs3d::_var_type aPrs3d; if(myStudyDocument->GetProperties()->IsLocked()) return TPrs3d::_nil(); Mutex mt(myMutex,qApp); - Result_i* pResult = dynamic_cast(GetServant(theResult).in()); - if(TPrs3d_i::IsPossible(pResult,theMeshName,theEntity,theFieldName,int(theIteration))){ - TPrs3d_i* aPresent = new TPrs3d_i(pResult,theAddToStudy); - if(aPresent->Create(theMeshName,theEntity,theFieldName,int(theIteration)) != NULL) - return aPresent->_this(); - else - aPresent->_remove_ref(); + if(Result_i* pResult = dynamic_cast(GetServant(theResult).in())){ + if(TPrs3d_i::IsPossible(pResult,theMeshName,theEntity,theFieldName,int(theIteration))){ + TPrs3d_i* aPresent = new TPrs3d_i(pResult,theAddToStudy); + if(aPresent->Create(theMeshName,theEntity,theFieldName,int(theIteration)) != NULL) + return aPresent->_this(); + else + aPresent->_remove_ref(); + } } return TPrs3d::_nil(); }