]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Add new checks
authorsmh <smh@opencascade.com>
Mon, 19 Apr 2004 05:51:48 +0000 (05:51 +0000)
committersmh <smh@opencascade.com>
Mon, 19 Apr 2004 05:51:48 +0000 (05:51 +0000)
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_Gen_i.hh

index 39edd18e8d261764f3ed4e433e69ef5d354259a3..cbf11b9e0b9b170fd13050d428cb56890b8b6162 100644 (file)
@@ -494,13 +494,14 @@ namespace VISU{
     if(myMutex){
       if(myStudyDocument->GetProperties()->IsLocked()) return Mesh::_nil();
       Mutex mt(myMutex,qApp);
-      Result_i* pResult = dynamic_cast<Result_i*>(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<Result_i*>(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<Result_i*>(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<Result_i*>(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<Result_i*>(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<Result_i*>(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);
index 5aa3f45353ec025f93a8183f955e404f742695c8..529514c7b2552e4611cc692b402cdd7955f6286c 100644 (file)
@@ -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<Result_i*>(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<Result_i*>(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();
     }