20002: EDF 821 SMESH : ExportMED GUI behavior

warning if no valid mesh selected
This commit is contained in:
eap 2008-10-14 09:23:28 +00:00
parent c5e983833f
commit 964fe4af29
2 changed files with 214 additions and 205 deletions

View File

@ -267,10 +267,17 @@
if( aSel )
aSel->selectedObjects( selected );
if(selected.Extent()){
SMESH::SMESH_Mesh_var aMesh;
if(selected.Extent() == 1)
aMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(selected.First());
if ( aMesh->_is_nil() ) {
SUIT_MessageBox::warning( SMESHGUI::desktop(),
QObject::tr( "SMESH_WRN_WARNING" ),
QObject::tr( "SMESH_BAD_MESH_SELECTION" ));
return;
}
Handle(SALOME_InteractiveObject) anIObject = selected.First();
SMESH::SMESH_Mesh_var aMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIObject);
if ( !aMesh->_is_nil() ) {
QString aFilter, aTitle = QObject::tr("Export mesh");
QMap<QString, SMESH::MED_VERSION> aFilterMap;
QMap<QString, int> aFilterMapSTL;
@ -476,8 +483,6 @@
}
}
}
}
}
inline void InverseEntityMode(unsigned int& theOutputMode,
unsigned int theMode)

View File

@ -805,6 +805,10 @@ Please enter correct values and try again</translation>
<source>SMESH_BAD_SELECTION</source>
<translation>No valid selection</translation>
</message>
<message>
<source>SMESH_BAD_MESH_SELECTION</source>
<translation>No valid mesh selection</translation>
</message>
<message>
<source>SMESH_BOUNDARYEDGES</source>
<translation>Boundary Edges</translation>