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=9e54cbd4987608a54c71dc274445d5e902abe857;hp=dc21b915cd32f6004ffd9ad9220fec1df464efd9;hb=c600d3a4e74936fe2f8356cabab66c766f2fdc6f;hpb=32d14d3084a1357854e927937452545c32fba7eb diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index dc21b915c..9e54cbd49 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(); @@ -879,8 +891,10 @@ void SMESH_Gen_i::UpdateIcons( SMESH::SMESH_Mesh_ptr theMesh ) SetPixMap( so, "ICON_SMESH_TREE_MESH_WARN" ); else if ( mesh_i->IsComputedOK() ) SetPixMap( so, "ICON_SMESH_TREE_MESH" ); - else + else if ( mesh_i->HasShapeToMesh() ) SetPixMap( so, "ICON_SMESH_TREE_MESH_PARTIAL" ); + else + SetPixMap( so, "ICON_SMESH_TREE_MESH_IMPORTED" ); // set icons of sub-objects SALOMEDS::Study_var study = getStudyServant();