From ea7a26a94823fda671a18d562cc70e83f124e718 Mon Sep 17 00:00:00 2001 From: smh Date: Mon, 19 Apr 2004 05:51:48 +0000 Subject: [PATCH] Add new checks --- src/VISU_I/VISU_Gen_i.cc | 45 +++++++++++++++++++++------------------- src/VISU_I/VISU_Gen_i.hh | 15 +++++++------- 2 files changed, 32 insertions(+), 28 deletions(-) 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(); } -- 2.39.2