diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index d4960fac5..e76fb8564 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -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."; diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 3ed34e9b3..61255b252 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -3896,6 +3896,14 @@ Please, create VTK viewer and try again PREF_SHRINK_COEFF Shrink coef. + + PREF_PYTHON_DUMP + Python Dump + + + PREF_HISTOTICAL_PYTHON_DUMP + Historical python dump + PREF_TAB_GENERAL General