]> SALOME platform Git repositories - plugins/ghs3dplugin.git/commitdiff
Salome HOME
avoid duplication of DumpPython commands
authoreap <eap@opencascade.com>
Tue, 22 Apr 2008 09:46:35 +0000 (09:46 +0000)
committereap <eap@opencascade.com>
Tue, 22 Apr 2008 09:46:35 +0000 (09:46 +0000)
src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx

index 5e849529643512161479b64147d822257828440e..4212f79facb3235f3c80cd23cc9e6057007b0897 100644 (file)
@@ -269,13 +269,20 @@ bool GHS3DPluginGUI_HypothesisCreator::storeParamsToHypo( const GHS3DHypothesisD
     if( isCreation() )
       SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.latin1() );
 
-    h->SetToMeshHoles      ( h_data.myToMeshHoles       );
-    h->SetMaximumMemory    ( h_data.myMaximumMemory     );
-    h->SetInitialMemory    ( h_data.myInitialMemory     );
-    h->SetInitialMemory    ( h_data.myInitialMemory     );
-    h->SetOptimizationLevel( h_data.myOptimizationLevel );
-    h->SetKeepFiles        ( h_data.myKeepFiles         );
-    h->SetWorkingDirectory ( h_data.myWorkingDir        );
+    if ( h->GetToMeshHoles() != h_data.myToMeshHoles ) // avoid duplication of DumpPython commands
+      h->SetToMeshHoles      ( h_data.myToMeshHoles       );
+    if ( h->GetMaximumMemory() != h_data.myMaximumMemory )
+      h->SetMaximumMemory    ( h_data.myMaximumMemory     );
+    if ( h->GetInitialMemory() != h_data.myInitialMemory )
+      h->SetInitialMemory    ( h_data.myInitialMemory     );
+    if ( h->GetInitialMemory() != h_data.myInitialMemory )
+      h->SetInitialMemory    ( h_data.myInitialMemory     );
+    if ( h->GetOptimizationLevel() != h_data.myOptimizationLevel )
+      h->SetOptimizationLevel( h_data.myOptimizationLevel );
+    if ( h->GetKeepFiles() != h_data.myKeepFiles )
+      h->SetKeepFiles        ( h_data.myKeepFiles         );
+    if (h->GetWorkingDirectory() != h_data.myWorkingDir )
+      h->SetWorkingDirectory ( h_data.myWorkingDir        );
   }
   catch(const SALOME::SALOME_Exception& ex)
   {