]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0021382: EDF 1985 SMESH: Read/write of .mesh files (GMF format)
authorvsr <vsr@opencascade.com>
Thu, 4 Oct 2012 15:54:27 +0000 (15:54 +0000)
committervsr <vsr@opencascade.com>
Thu, 4 Oct 2012 15:54:27 +0000 (15:54 +0000)
- Move all export mesh commands to the single Export submenu (as in main menu File)

src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESH_msg_en.ts

index 00c90b214af545d9f229fec99f1fc3342ddaee55..0177e876d41bfacd9b7d14c5df9af6c5c13b68ed 100644 (file)
@@ -3495,12 +3495,8 @@ void SMESHGUI::createPopupItem( const int id,
                                 const QString& theRule,
                                 const int pId )
 {
-  int parentId = pId;
-  if( pId!=-1 )
-    parentId = popupMgr()->actionId( action( pId ) );
-
   if( !popupMgr()->contains( popupMgr()->actionId( action( id ) ) ) )
-    popupMgr()->insert( action( id ), parentId, 0 );
+    popupMgr()->insert( action( id ), pId, 0 );
 
   QString lc = "$";        // VSR : instead of QtxPopupSelection::defEquality();
   QString dc = "selcount"; // VSR : insetad of QtxPopupSelection::defSelCountParam()
@@ -3551,13 +3547,13 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction(  142, "CGNS");
   createSMESHAction(  144, "SAUV");
   createSMESHAction(  146, "GMF" );
-  createSMESHAction(  124, "EXPORT_DAT" );
-  createSMESHAction(  125, "EXPORT_MED" );
-  createSMESHAction(  126, "EXPORT_UNV" );
-  createSMESHAction(  141, "EXPORT_STL" );
-  createSMESHAction(  143, "EXPORT_CGNS");
-  createSMESHAction(  145, "EXPORT_SAUV");
-  createSMESHAction(  147, "EXPORT_GMF" );
+  createSMESHAction(  124, "DAT" );
+  createSMESHAction(  125, "MED" );
+  createSMESHAction(  126, "UNV" );
+  createSMESHAction(  141, "STL" );
+  createSMESHAction(  143, "CGNS");
+  createSMESHAction(  145, "SAUV");
+  createSMESHAction(  147, "GMF" );
   createSMESHAction(  150, "FILE_INFO" );
   createSMESHAction(   33, "DELETE",          "ICON_DELETE", Qt::Key_Delete );
   createSMESHAction( 5105, "SEL_FILTER_LIB" );
@@ -4067,14 +4063,16 @@ void SMESHGUI::initialize( CAM_Application* app )
   QString multiple_non_empty = QString( " && %1>0 && numberOfNodes>0" ).arg( dc );
   QString only_one_2D        = only_one_non_empty + " && dim>1";
 
-  createPopupItem( 125, OB, mesh_group, multiple_non_empty );   // EXPORT_MED
-  createPopupItem( 126, OB, mesh_group, only_one_non_empty );   // EXPORT_UNV
-  createPopupItem( 141, OB, mesh_group, only_one_2D );          // EXPORT_STL
+  int anId = popupMgr()->insert( tr( "MEN_EXPORT" ), -1, -1 );        // EXPORT submenu
+  createPopupItem( 125, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_MED
+  createPopupItem( 126, OB, mesh_group, only_one_non_empty, anId );   // EXPORT_UNV
+  createPopupItem( 141, OB, mesh_group, only_one_2D, anId );          // EXPORT_STL
 #ifdef WITH_CGNS
-  createPopupItem( 143, OB, mesh_group, multiple_non_empty );   // EXPORT_CGNS
+  createPopupItem( 143, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_CGNS
 #endif
-  createPopupItem( 145, OB, mesh_group, multiple_non_empty );   // EXPORT_SAUV
-  createPopupItem( 147, OB, mesh_group, multiple_non_empty );   // EXPORT_GMF
+  createPopupItem( 145, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_SAUV
+  createPopupItem( 147, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_GMF
+  createPopupItem( 124, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_DAT
   createPopupItem(  33, OB, mesh_part + " " + hyp_alg );        // DELETE
   createPopupItem( 813, OB, group );                            // DEL_GROUP with contents
   popupMgr()->insert( separator(), -1, 0 );
@@ -4094,7 +4092,6 @@ void SMESHGUI::initialize( CAM_Application* app )
   createPopupItem( 1137, OB + " " + View, mesh, "&& isAutoColor" );       // DISABLE_AUTO_COLOR
   popupMgr()->insert( separator(), -1, 0 );
 
-  int anId;
   QString aClient = QString( "%1client in {%2}" ).arg( lc ).arg( "'VTKViewer'" );
   QString aType = QString( "%1type in {%2}" ).arg( lc );
   aType = aType.arg( mesh_part );
index 84f6c2ee10ae80eef8e8de225672eed141ba3ea8..5253ff02d3eabb82c713a9e77b9dc5cd4d094ed4 100644 (file)
     </message>
     <message>
         <source>MEN_IMPORT_DAT</source>
-        <translation>DAT File</translation>
+        <translation>DAT file</translation>
     </message>
     <message>
         <source>MEN_DAT</source>
-        <translation>DAT File</translation>
+        <translation>DAT file</translation>
     </message>
     <message>
         <source>MEN_DELETE</source>
     </message>
     <message>
         <source>MEN_EXPORT_DAT</source>
-        <translation>Export to DAT File</translation>
+        <translation>Export to DAT file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_MED</source>
-        <translation>Export to MED File</translation>
+        <translation>Export to MED file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_CGNS</source>
-        <translation>Export to CGNS File</translation>
+        <translation>Export to CGNS file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_GMF</source>
-        <translation>Export to GMF File</translation>
+        <translation>Export to GMF file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_SAUV</source>
     </message>
     <message>
         <source>MEN_EXPORT_STL</source>
-        <translation>Export to STL File</translation>
+        <translation>Export to STL file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_UNV</source>
-        <translation>Export to UNV File</translation>
+        <translation>Export to UNV file</translation>
     </message>
     <message>
         <source>MEN_EXTRUSION</source>
     </message>
     <message>
         <source>MEN_IMPORT_STL</source>
-        <translation>STL File</translation>
+        <translation>STL file</translation>
     </message>
     <message>
         <source>MEN_STL</source>
-        <translation>STL File</translation>
+        <translation>STL file</translation>
     </message>
     <message>
         <source>MEN_SYM</source>
     </message>
     <message>
         <source>MEN_IMPORT_UNV</source>
-        <translation>UNV File</translation>
+        <translation>UNV file</translation>
     </message>
     <message>
         <source>MEN_UNV</source>
-        <translation>UNV File</translation>
+        <translation>UNV file</translation>
     </message>
     <message>
         <source>MEN_UN_GROUP</source>