Salome HOME
Transfer BreakLink from Object to Gen
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Hypotheses.cxx
index db3aa0e4813d4535adadc0412775fdb651bc26fb..5522e314482121f3d72f3a22183146998255fd73 100644 (file)
@@ -489,7 +489,7 @@ SMESHGUI_GenericHypothesisCreator::ListOfWidgets& SMESHGUI_GenericHypothesisCrea
 
 //================================================================================
 /*!
- * \brief Returns a QLabel of a spesified parameter.
+ * \brief Returns a QLabel of a specified parameter.
  * If isCreation(), the 1st label (supposed to be "Name") is not countered.
  */
 //================================================================================
@@ -830,7 +830,7 @@ bool HypothesesSet::isAlgo() const
 void HypothesesSet::init( bool isAlgo )
 {
   myIsAlgo = isAlgo;
-  myIndex = -1;
+  myIndex = 0;
 }
 
 bool HypothesesSet::more() const
@@ -864,8 +864,7 @@ int HypothesesSet::maxDim() const
   int dim = -1;
   for ( int isAlgo = 0; isAlgo < 2; ++isAlgo )
   {
-    thisSet->init( isAlgo );
-    while ( thisSet->next(), thisSet->more() )
+    for ( thisSet->init( isAlgo ); thisSet->more(); thisSet->next() )
       if ( HypothesisData* hypData = SMESH::GetHypothesisData( thisSet->current() ))
         for ( int i = 0; i < hypData->Dim.count(); ++i )
           dim = qMax( dim, hypData->Dim[i] );