From: imn Date: Mon, 22 Jun 2015 12:06:00 +0000 (+0300) Subject: INT PAL 0052778: Algorithms of SMESH plugins have incorrect set of hypotheses X-Git-Tag: V7_7_0a1~38 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=03a1295ce9c17ecb847cab11f4e0c102a6bff6f4;hp=3c0d0df84892d19e42ae9b5331646c0617cd6a16 INT PAL 0052778: Algorithms of SMESH plugins have incorrect set of hypotheses --- diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 708e7f40d..ff9851008 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -1496,17 +1496,21 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex, if ( anAvailable.count() == 1 ) soleCompatible = myAvailableHypData[dim][Algo][0]; if ( dim == aTopDim && prevAlgo ) {// all available algoritms should be selectable any way - anAvailable.clear(); - for (int i = 0; i < myFilteredAlgoData[dim].count(); ++i) { - HypothesisData* aCurAlgo = myFilteredAlgoData[dim][ i ]; - anAvailable.append( aCurAlgo->Label ); + if (aTopDim == SMESH::DIM_2D) { + anAvailable.clear(); + for (int i = 0; i < myFilteredAlgoData[dim].count(); ++i) { + HypothesisData* aCurAlgo = myFilteredAlgoData[dim][ i ]; + anAvailable.append( aCurAlgo->Label ); + } } + if (aTopDim == SMESH::DIM_3D) + availableHyps( dim, Algo, anAvailable, myAvailableHypData[dim][Algo], 0 ); } myDlg->tab( dim )->setAvailableHyps( Algo, anAvailable ); noCompatible = anAvailable.isEmpty(); // restore previously selected algo - if (dim == aTopDim && prevAlgo) + if (dim == aTopDim && prevAlgo && aTopDim == SMESH::DIM_2D) algoIndex = myFilteredAlgoData[dim].indexOf( curAlgo ); else algoIndex = myAvailableHypData[dim][Algo].indexOf( curAlgo );