- // check that tab enabled of one less dimension
- if ( aDim > SMESH::DIM_0D )
- {
- if ( myIsOnGeometry ) {
- QString anCompareType = currentMeshTypeName(myDlg->currentMeshType());
- bool is2dtype = ( anCompareType == "QUAD" ) || ( anCompareType == "TRIA" );
- int dim = is2dtype ? SMESH::DIM_2D : SMESH::DIM_3D;
- for (int i = dim; i >= SMESH::DIM_0D; i--) {
- if ( i != aDim ) {
- if ( algoData && algoData->InputTypes.isEmpty() ) {
- myDlg->disableTab( i );
- setCurrentHyp(i, Algo, -1);
- }
- else {
- myDlg->enableTab( i );
- }
+ // enable / disable tabs
+ if ( myIsOnGeometry ) {
+ for (int i = SMESH::DIM_3D; i >= SMESH::DIM_0D; i--) {
+ if ( i > aDim ) {
+ if ( i > myMaxShapeDim ) myDlg->disableTab( i );
+ else myDlg->enableTab( i );
+ }
+ else if ( i == aDim ) {
+ continue;
+ }
+ else {//( i < aDim )
+ if ( algoData && algoData->InputTypes.isEmpty() ) {
+ myDlg->disableTab( i );
+ for ( int type = Algo, nbTypes = nbDlgHypTypes(i); type < nbTypes; type++ )
+ setCurrentHyp(i, type, -1);
+ }
+ else {
+ myDlg->enableTab( i );