X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI.cxx;h=b584a345d6db12cd61a2060866d30b9404a6a563;hp=527386e743505990c0fe266a514929459d80822b;hb=ccb5e3c25bf204e839c0094f50f543eacedba5e6;hpb=dbd1374aa8aeac32c368b8f6add841e0bd90f807 diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 527386e74..b584a345d 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -143,6 +143,7 @@ #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes) #include CORBA_CLIENT_HEADER(SMESH_MeshEditor) #include CORBA_CLIENT_HEADER(SMESH_Measurements) +#include CORBA_CLIENT_HEADER(SMESH_Mesh) // Qt includes // #define INCLUDE_MENUITEM_DEF // VSR commented ???????? @@ -653,7 +654,7 @@ namespace // Get parameters of export operation QString aFilename; - SMESH::MED_VERSION aFormat = SMESH::MED_V2_2; + SMESH::MED_VERSION aFormat = SMESH::MED_LATEST; // Init the parameters with the default values bool aIsASCII_STL = true; bool toCreateGroups = false; @@ -741,11 +742,17 @@ namespace else if ( isMED || isSAUV ) // Export to MED or SAUV { QMap aFilterMap; - //QString v21 (aMesh->GetVersionString(SMESH::MED_V2_1, 2)); if ( isMED ) { QString v22 (aMesh->GetVersionString(SMESH::MED_V2_2, 2)); - //aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( v21 ) + " (*.med)", SMESH::MED_V2_1 ); aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( v22 ) + " (*.med)", SMESH::MED_V2_2 ); + int minor = v22.split(".").last().toInt(); + int vv= int(SMESH::MED_MINOR_0); // add all minor from 0 to current + for (int ii=0; iiGetVersionString(SMESH::MED_VERSION(vv), 2); + aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( vs ) + " (*.med)", SMESH::MED_VERSION(vv)); + vv = vv +1; + } } else { // isSAUV aFilterMap.insert("All files (*)", SMESH::MED_V2_1 ); @@ -826,7 +833,7 @@ namespace } if( !toOverwrite ) { // can't append to an existing using other format - SMESH::MED_VERSION aVersion = SMESH::MED_V2_1; + SMESH::MED_VERSION aVersion = aFormat; //SMESH::MED_V2_1; bool isVersionOk = SMESHGUI::GetSMESHGen()->GetMEDVersion( aFilename.toUtf8().constData(), aVersion ); if( !isVersionOk || aVersion != aFormat ) { int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(), @@ -2646,9 +2653,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) if(checkLock(aStudy)) break; SUIT_OverrideCursor wc; try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif SMESH::UpdateView(); } catch (std::bad_alloc) { // PAL16774 (Crash after display of many groups)