Salome HOME
#17845 [EDF] Modifications of Automatic meshing
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshOp.cxx
index c33a4fe927cf45fac1d706b6b8439eef6b475445..8ee061cd71400c8d44b125d2d585a1ca2785b60a 100644 (file)
@@ -2946,9 +2946,19 @@ void SMESHGUI_MeshOp::updateHypoSets()
       }
       currentHypoSet->setAlgoAvailable( sType, isAvailable );
     }
+    if ( currentHypoSet->hasAlgo( HypothesesSet::MAIN ) &&
+         currentHypoSet->hasAlgo( HypothesesSet::ALT ))
+    {
+      HypothesesSet::SetType setType = HypothesesSet::getPreferredHypType();
+      if ( !currentHypoSet->getAlgoAvailable( setType ))
+        continue; // not add if a preferred type not available currently
+    }
+
     if ( currentHypoSet->getAlgoAvailable( HypothesesSet::MAIN ) ||
          currentHypoSet->getAlgoAvailable( HypothesesSet::ALT ))
+    {
       aFilteredHypothesesSetsList.append( *inHypoSetName );
+    }
   }
   myDlg->setHypoSets( aFilteredHypothesesSetsList );
 }