X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Gen_i_1.cxx;h=a73f93c3c0417fcd49ad3dd738dc02fb01b7f0aa;hp=dc21b915cd32f6004ffd9ad9220fec1df464efd9;hb=78a29bb10360e6b832b47399d665ec86fb3db7e3;hpb=ec2b6eb2fb72bce2449d1c0eeb24ad157e571eab diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index dc21b915c..a73f93c3c 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -165,7 +165,7 @@ bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) { if(MYDEBUG) MESSAGE("CanPublishInStudy - "<NewBuilder(); SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = getStudyServant()->GetUseCaseBuilder(); @@ -572,8 +576,10 @@ SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent() SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SMESH::SMESH_Mesh_ptr theMesh, const char* theName) { + if ( !myIsEnablePublish ) + return SALOMEDS::SObject::_nil(); if ( CORBA::is_nil( theMesh )) - return SALOMEDS::SComponent::_nil(); + return SALOMEDS::SObject::_nil(); if(MYDEBUG) MESSAGE("PublishMesh--IN"); // find or publish a mesh @@ -659,6 +665,8 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SMESH::SMESH_Mesh_ptr theM GEOM::GEOM_Object_ptr theShapeObject, const char* theName) { + if ( !myIsEnablePublish ) + return SALOMEDS::SObject::_nil(); if ( theMesh->_is_nil() || theSubMesh->_is_nil() || theShapeObject->_is_nil() ) return SALOMEDS::SObject::_nil(); @@ -749,6 +757,8 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShapeObject, const char* theName) { + if ( !myIsEnablePublish ) + return SALOMEDS::SObject::_nil(); if (theMesh->_is_nil() || theGroup->_is_nil() ) return SALOMEDS::SObject::_nil(); @@ -823,6 +833,8 @@ SALOMEDS::SObject_ptr const char* theName) { if(MYDEBUG) MESSAGE("PublishHypothesis") + if ( !myIsEnablePublish ) + return SALOMEDS::SObject::_nil(); if (theHyp->_is_nil()) return SALOMEDS::SObject::_nil();