From: enk Date: Wed, 22 Jun 2005 06:45:14 +0000 (+0000) Subject: Fix Bug IPAL8770: There is no any warning message if to export polygonal elements... X-Git-Tag: T3_0_0_a4~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=82d43d0f5d4d4cd282dd9c55e56ae67aeba37845;p=modules%2Fsmesh.git Fix Bug IPAL8770: There is no any warning message if to export polygonal elements into MED 2.1 file. --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 21602a0fa..2c49e211e 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -307,9 +307,26 @@ namespace{ SUIT_FileDlg* fd = new SUIT_FileDlg( SMESHGUI::desktop(), false, true, true ); fd->setCaption( aTitle ); fd->setFilters( filters ); - fd->exec(); - aFilename = fd->selectedFile(); - aFormat = aFilterMap[fd->selectedFilter()]; + bool is_ok = false; + while(!is_ok){ + 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; } if ( !aFilename.isEmpty() ) { diff --git a/src/SMESHGUI/SMESH_msg_en.po b/src/SMESHGUI/SMESH_msg_en.po index b49bf9fbb..175fbdf64 100644 --- a/src/SMESHGUI/SMESH_msg_en.po +++ b/src/SMESHGUI/SMESH_msg_en.po @@ -1210,6 +1210,12 @@ msgid "SMESH_EXPORT_UNV" msgstr "During export mesh with name - \"%1\" to UNV\n" " 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" msgstr "Select an object"