Fix Bug IPAL8770: There is no any warning message if to export polygonal elements into MED 2.1 file.

This commit is contained in:
enk 2005-06-22 06:45:14 +00:00
parent b4b3d57776
commit 82d43d0f5d
2 changed files with 26 additions and 3 deletions

View File

@ -307,9 +307,26 @@ namespace{
SUIT_FileDlg* fd = new SUIT_FileDlg( SMESHGUI::desktop(), false, true, true ); SUIT_FileDlg* fd = new SUIT_FileDlg( SMESHGUI::desktop(), false, true, true );
fd->setCaption( aTitle ); fd->setCaption( aTitle );
fd->setFilters( filters ); fd->setFilters( filters );
fd->exec(); bool is_ok = false;
aFilename = fd->selectedFile(); while(!is_ok){
aFormat = aFilterMap[fd->selectedFilter()]; fd->exec();
aFilename = fd->selectedFile();
aFormat = aFilterMap[fd->selectedFilter()];
is_ok = true;
if( !aFilename.isEmpty()
&& (aMesh->NbPolygons()>0 or aMesh->NbPolyhedrons()>0)
&& aFormat==SMESH::MED_V2_1){
int aRet = SUIT_MessageBox::warn2(SMESHGUI::desktop(),
QObject::tr("SMESH_WRN_WARNING"),
QObject::tr("SMESH_EXPORT_MED_V2_1").arg(anIObject->getName()),
QObject::tr("SMESH_BUT_YES"),
QObject::tr("SMESH_BUT_NO"),
0,1,0);
if(aRet){
is_ok = false;
}
}
}
delete fd; delete fd;
} }
if ( !aFilename.isEmpty() ) { if ( !aFilename.isEmpty() ) {

View File

@ -1210,6 +1210,12 @@ msgid "SMESH_EXPORT_UNV"
msgstr "During export mesh with name - \"%1\" to UNV\n" msgstr "During export mesh with name - \"%1\" to UNV\n"
" pyramid's elements will be missed" " pyramid's elements will be missed"
msgid "SMESH_EXPORT_MED_V2_1"
msgstr "During export mesh with name - \"%1\" to MED 2.1\n"
"polygons and polyhedrons elements will be missed\n"
"For correct export use MED 2.2\n"
"Are you sure want to export to MED 2.1 ?"
msgid "INF_SELECT_OBJECT" msgid "INF_SELECT_OBJECT"
msgstr "Select an object" msgstr "Select an object"