Salome HOME
IPAL54678: TC-9.5.0: Sub-mesh priority: not all sub-meshes are displayed in the dialog
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshOp.cxx
index cb3185b888f67320a432eb7123b5110577bc3d7b..f143b01368028d22786f5fbffe3f0f18907da481 100644 (file)
@@ -1913,6 +1913,7 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName )
   if ( aHypoSet->toUseCommonSize() && !getAverageSize( myAverageSize ))
     return;
 
+  int maxDim = -1;
   for ( int isAlgo = 1; isAlgo >= 0; --isAlgo )
     for ( aHypoSet->init( isAlgo, setType ); aHypoSet->more(); aHypoSet->next() )
     {
@@ -1930,6 +1931,7 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName )
         {
           setCurrentHyp( myDim, Algo, index );
           onAlgoSelected( index, myDim );
+          maxDim = Max( maxDim, myDim );
         }
       }
       else
@@ -1963,6 +1965,9 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName )
       }
     }
 
+  if ( maxDim > 0 )
+    myDlg->setCurrentTab( maxDim );
+
   return;
 }