]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
PAL13473 (Build repetitive mesh):
authoreap <eap@opencascade.com>
Thu, 7 Dec 2006 08:34:23 +0000 (08:34 +0000)
committereap <eap@opencascade.com>
Thu, 7 Dec 2006 08:34:23 +0000 (08:34 +0000)
use hypotheses of Regular_1D only

src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx

index f8c90e728befcfd9ac7c359a5c5ec0e3d8da77cb..836eb55235acd2e40c3dcb43e11e020ae75b44ad 100644 (file)
@@ -116,10 +116,17 @@ void StdMeshersGUI_LayerDistributionParamWdg::init()
 
   myHypTypePopup = new QPopupMenu();
 
-  QStringList aHypTypeNameList = SMESH::GetAvailableHypotheses( false, 0 );
+  // Add to pop-up hypotheses of "Regular_1D" algo
   myHypTypePopup->clear();
-  for ( int i = 0, n = aHypTypeNameList.count(); i < n; i++ ) {
-    myHypTypePopup->insertItem( aHypTypeNameList[ i ] );
+  HypothesisData* algoData = SMESH::GetHypothesisData( "Regular_1D" );
+  QStringList aHypTypeNameList = SMESH::GetAvailableHypotheses( false, 0 );
+  QStringList::const_iterator anIter = aHypTypeNameList.begin();
+  for ( int i = 0; anIter != aHypTypeNameList.end(); ++anIter, ++i )
+  {
+    HypothesisData* hypData = SMESH::GetHypothesisData( *anIter );
+    bool bidon;
+    if ( SMESH::IsAvailableHypothesis( algoData, hypData->TypeName, bidon ))
+      myHypTypePopup->insertItem( hypData->Label );
   }
 
   connect( myCreateButton, SIGNAL(clicked()), SLOT(onCreate()));