mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-29 02:40:35 +05:00
20002: EDF 821 SMESH : ExportMED GUI behavior
warning if no valid mesh selected
This commit is contained in:
parent
c5e983833f
commit
964fe4af29
@ -267,10 +267,17 @@
|
|||||||
if( aSel )
|
if( aSel )
|
||||||
aSel->selectedObjects( selected );
|
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();
|
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");
|
QString aFilter, aTitle = QObject::tr("Export mesh");
|
||||||
QMap<QString, SMESH::MED_VERSION> aFilterMap;
|
QMap<QString, SMESH::MED_VERSION> aFilterMap;
|
||||||
QMap<QString, int> aFilterMapSTL;
|
QMap<QString, int> aFilterMapSTL;
|
||||||
@ -476,8 +483,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void InverseEntityMode(unsigned int& theOutputMode,
|
inline void InverseEntityMode(unsigned int& theOutputMode,
|
||||||
unsigned int theMode)
|
unsigned int theMode)
|
||||||
|
@ -805,6 +805,10 @@ Please enter correct values and try again</translation>
|
|||||||
<source>SMESH_BAD_SELECTION</source>
|
<source>SMESH_BAD_SELECTION</source>
|
||||||
<translation>No valid selection</translation>
|
<translation>No valid selection</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_BAD_MESH_SELECTION</source>
|
||||||
|
<translation>No valid mesh selection</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_BOUNDARYEDGES</source>
|
<source>SMESH_BOUNDARYEDGES</source>
|
||||||
<translation>Boundary Edges</translation>
|
<translation>Boundary Edges</translation>
|
||||||
|
Loading…
Reference in New Issue
Block a user