From: asl Date: Tue, 8 Nov 2005 12:26:47 +0000 (+0000) Subject: PAL5597 - forbid to export empty mesh by popup X-Git-Tag: V2_2_6~1 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=1d63486c23e669e0125e72e40ad0bf3db7c4323d;hp=2440f0942ba536aae8c8f9ae259445101aad4cb2 PAL5597 - forbid to export empty mesh by popup --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 476970f61..3dc209fa3 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -2434,6 +2434,19 @@ bool SMESHGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString popup->removeItem( 1102 ); } else if ( theObject == "Mesh" || theObject == "SubMesh" || theObject == "Group" ) { + if( theObject=="Mesh" ) + { + CORBA::Object_var obj = SMESH::SObjectToObject( SO, SMESH::GetActiveStudyDocument() ); + if( !CORBA::is_nil( obj ) ) + { + SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( obj ); + if( !aMesh->_is_nil() && aMesh->NbNodes()==0 ) + { + popup->removeItem( 122 ); + popup->removeItem( 123 ); + } + } + } // get actor GEOM::GEOM_Object_var aShapeObject = SMESH::GetShapeOnMeshOrSubMesh( SO ); if ( aShapeObject->_is_nil() ) {