From: eap Date: Wed, 26 Feb 2014 08:57:20 +0000 (+0400) Subject: 22364: EDF SMESH: Create Mesh dialog box improvement: hide inapplicable algorithms... X-Git-Tag: V7_4_0a1~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=10e32df831752f2629a05d40cdeb82d575b7392c;p=modules%2Fsmesh.git 22364: EDF SMESH: Create Mesh dialog box improvement: hide inapplicable algorithms/hypotheses Bug: 3D tab disabled on an imported mesh --- diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index babfd2f22..b8b73db38 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -2606,14 +2606,16 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI if ( isAvailableChoiceAlgo ) setCurrentHyp( dim, Algo, anCurrentAvailableAlgo ); } - int aDimNotGeometry = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_3D; if ( !myIsOnGeometry ) - for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ){ - myDlg->disableTab( i ); + for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ) { + if ( i < SMESH::DIM_3D ) myDlg->disableTab( i ); + else myDlg->enableTab( i ); + } + else + for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ) { + if ( i > myMaxShapeDim ) myDlg->disableTab( i ); + else myDlg->enableTab( i ); } - for ( int i = aDimNotGeometry; i <= myMaxShapeDim; i++ ) { - myDlg->enableTab( i ); - } myDlg->setCurrentTab( theTabIndex ); } else