Salome HOME
#16522 [CEA 7599] Viscous layers hypothesis: extract layers as a group
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Hypotheses.cxx
index 2c22e5a54af5f2f388089a357ce9ad0535eddc31..521966bf7980d3941279a6ad2247371e311f3b28 100644 (file)
@@ -185,10 +185,11 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
   GroupC1Layout->setMargin( MARGIN );
 
   ListOfStdParams::const_iterator anIt = params.begin(), aLast = params.end();
-  for( int i=0; anIt!=aLast; anIt++, i++ )
+  for( int i = 0; anIt != aLast; anIt++, i++ )
   {
-    QLabel* lab = new QLabel( (*anIt).myName, GroupC1 );
-    GroupC1Layout->addWidget( lab, i, 0 );
+    QLabel* lab = anIt->hasName() ? new QLabel( anIt->myName, GroupC1 ) : NULL;
+    if ( lab )
+      GroupC1Layout->addWidget( lab, i, 0 );
     myParamLabels << lab;
 
     QWidget* w = getCustomWidget( *anIt, GroupC1, i );
@@ -251,9 +252,12 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
       default:;
       } // switch( (*anIt).myValue.type() )
 
-    if( w )
+    if ( w )
     {
-      GroupC1Layout->addWidget( w, i, 1 );
+      if ( lab )
+        GroupC1Layout->addWidget( w, i, 1 );
+      else
+        GroupC1Layout->addWidget( w, i, 0, 1, 2 );
       changeWidgets().append( w );
     }
   }
@@ -807,8 +811,8 @@ HypothesesSet::HypothesesSet( const QString& theSetName,
   : myUseCommonSize( useCommonSize ),
     myQuadDominated( isQuadDominated ),
     myHypoSetName( theSetName ),
-    myHypoList({ mainHypos, altHypos, intHypos }),
-    myAlgoList({ mainAlgos, altAlgos, intAlgos }),
+       myHypoList { mainHypos, altHypos, intHypos },
+       myAlgoList { mainAlgos, altAlgos, intAlgos },
     myIsAlgo( false ),
     myIsCustom( false ),
     myIndex( 0 )