Salome HOME
0021375: EDF 1671 SMESH: Dump study of current state
authoreap <eap@opencascade.com>
Thu, 9 Feb 2012 13:13:29 +0000 (13:13 +0000)
committereap <eap@opencascade.com>
Thu, 9 Feb 2012 13:13:29 +0000 (13:13 +0000)
   add "historical_python_dump" preference

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

index d4960fac5723769d792ba2ff468274df9e1dd535..e76fb856455ecc8ad81856a36caa52ae9253681d 100644 (file)
@@ -1713,6 +1713,11 @@ LightApp_Module( "SMESH" )
     myComponentSMESH->SetBoundaryBoxSegmentation( nbSeg );
     nbSeg = aResourceMgr->integerValue( "SMESH", "nb_segments_per_edge", 15 );
     myComponentSMESH->SetDefaultNbSegments( nbSeg );
+    if ( aResourceMgr->hasValue( "SMESH", "historical_python_dump" ))
+    {
+      QString val = aResourceMgr->stringValue( "SMESH", "historical_python_dump" );
+      myComponentSMESH->SetOption( "historical_python_dump", val.toLatin1().constData() );
+    }
   }
 
   myActiveDialogBox = 0;
@@ -4607,6 +4612,9 @@ void SMESHGUI::createPreferences()
   setPreferenceProperty( chunkSize, "max",  1000 );
   setPreferenceProperty( chunkSize, "step", 50 );
 
+  int pyDumpGroup = addPreference( tr( "PREF_PYTHON_DUMP" ), genTab );
+  addPreference( tr( "PREF_HISTOTICAL_PYTHON_DUMP" ), pyDumpGroup, LightApp_Preferences::Bool, "SMESH", "historical_python_dump" );
+
   // Mesh tab ------------------------------------------------------------------------
   int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
   int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
@@ -4860,6 +4868,10 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
       int nbSeg = aResourceMgr->integerValue( "SMESH", "nb_segments_per_edge", 15 );
       myComponentSMESH->SetDefaultNbSegments( nbSeg );
     }
+    else if ( name == "historical_python_dump" ) {
+      QString val = aResourceMgr->stringValue( "SMESH", "historical_python_dump" );
+      myComponentSMESH->SetOption( "historical_python_dump", val.toLatin1().constData() );
+    }
 
     if(aWarning.size() != 0){
       aWarning += "The default values are applied instead.";
index 3ed34e9b3d20097f6dd59c6c5f9bd08273912f18..61255b252def84c32eb449be828752b5f1ef3f1d 100644 (file)
@@ -3896,6 +3896,14 @@ Please, create VTK viewer and try again</translation>
         <source>PREF_SHRINK_COEFF</source>
         <translation>Shrink coef.</translation>
     </message>
+    <message>
+        <source>PREF_PYTHON_DUMP</source>
+        <translation>Python Dump</translation>
+    </message>
+    <message>
+        <source>PREF_HISTOTICAL_PYTHON_DUMP</source>
+        <translation>Historical python dump</translation>
+    </message>
     <message>
         <source>PREF_TAB_GENERAL</source>
         <translation>General</translation>