Salome HOME
Manage concurrent hypotheses sets properly
authorvsr <vsr@opencascade.com>
Fri, 18 Oct 2013 11:05:26 +0000 (11:05 +0000)
committervsr <vsr@opencascade.com>
Fri, 18 Oct 2013 11:05:26 +0000 (11:05 +0000)
bin/smesh_setenv.py
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx

index aa78a39f511df3dd5a7fe4ee57db92ed8243c603..9311968b024baa17d3c118238917beac3d5a6d1d 100644 (file)
@@ -36,7 +36,7 @@ def set_env(args):
         pass
 
     # find plugins
-    plugin_list = []
+    plugin_list = ["StdMeshers"]
     resource_path_list = []
     for env_var in os.environ.keys():
         value = os.environ[env_var]
@@ -78,7 +78,6 @@ def set_env(args):
                         pass
                     pass
                 break
-    plugin_list.append("StdMeshers")
     os.environ["SMESH_MeshersList"] = ":".join(plugin_list)
     os.environ["SalomeAppConfig"] = os.environ["SalomeAppConfig"] + psep + psep.join(resource_path_list)
 
index 8dd81441a6b23d4e1aac0fd3016263970f530946..7898e44e42a28a105c4ca812cfbf1e1726a8a04d 100644 (file)
@@ -224,18 +224,17 @@ namespace SMESH
             for( ;it1 != aXmlHandler->myHypothesesMap.end(); it1++)
               myHypothesesMap.insert( it1.key(), it1.value() );
             
-            
             it1 = aXmlHandler->myAlgorithmsMap.begin();
             for( ;it1 != aXmlHandler->myAlgorithmsMap.end(); it1++)
               myAlgorithmsMap.insert( it1.key(), it1.value() );
             
-            QList<HypothesesSet*>::iterator it, pos = myListOfHypothesesSets.begin();
+            QList<HypothesesSet*>::iterator it;
             for ( it = aXmlHandler->myListOfHypothesesSets.begin(); 
                   it != aXmlHandler->myListOfHypothesesSets.end();
                   ++it )
             {
               (*it)->setIsCustom( i == 0 );
-              myListOfHypothesesSets.insert( pos, *it );
+              myListOfHypothesesSets.append( *it );
             }
           }
           else {
@@ -316,6 +315,7 @@ namespace SMESH
         aSetNameList.append( mangledHypoSetName( aSet ));
       }
     }
+    aSetNameList.removeDuplicates();
     aSetNameList.sort();
 
     //  reverse order of aSetNameList