Salome HOME
Add missing French translations
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index d4960fac5723769d792ba2ff468274df9e1dd535..6ab62a0afa4247bac43d4b15f6c0494b403b32a4 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_HISTORICAL_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 );
@@ -4691,19 +4699,11 @@ void SMESHGUI::createPreferences()
 
   addPreference( tr( "PREF_OBJECT_COLOR" ), selGroup, LightApp_Preferences::Color, "SMESH", "selection_object_color" );
   addPreference( tr( "PREF_ELEMENT_COLOR" ), selGroup, LightApp_Preferences::Color, "SMESH", "selection_element_color" );
-  int selW = addPreference( tr( "PREF_WIDTH" ), selGroup, LightApp_Preferences::IntSpin, "SMESH", "selection_width" );
-
-  setPreferenceProperty( selW, "min", 1 );
-  setPreferenceProperty( selW, "max", 5 );
 
   int preGroup = addPreference( tr( "PREF_GROUP_PRESELECTION" ), selTab );
   setPreferenceProperty( preGroup, "columns", 2 );
 
   addPreference( tr( "PREF_HIGHLIGHT_COLOR" ), preGroup, LightApp_Preferences::Color, "SMESH", "highlight_color" );
-  int preW = addPreference( tr( "PREF_WIDTH" ), preGroup, LightApp_Preferences::IntSpin, "SMESH", "highlight_width" );
-
-  setPreferenceProperty( preW, "min", 1 );
-  setPreferenceProperty( preW, "max", 5 );
 
   int precSelGroup = addPreference( tr( "PREF_GROUP_PRECISION" ), selTab );
   setPreferenceProperty( precSelGroup, "columns", 2 );
@@ -4806,7 +4806,7 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
     std::string aWarning;
     SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this);
     if( name=="selection_object_color" || name=="selection_element_color" ||
-        name=="selection_width" || name=="highlight_color" || name=="highlight_width" ||
+        name=="highlight_color" ||
         name=="selection_precision_node" || name=="selection_precision_element" ||
         name=="selection_precision_object")
       SMESH::UpdateSelectionProp( this );
@@ -4860,6 +4860,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.";