X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_HypothesesUtils.cxx;h=96f59ae8af1c8c99463bb220e114fb358b7a0377;hp=75fde54b194d956fb5dfdfe53444a06156fb20e7;hb=f4cb697fcc605c3b9cdb517f9b4eef6b8532dc1a;hpb=e84f6641987cde6a8123af734a1fb44bbda37879 diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 75fde54b1..96f59ae8a 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -193,7 +193,9 @@ namespace SMESH{ } - QStringList GetAvailableHypotheses(const bool isAlgo) + QStringList GetAvailableHypotheses( const bool isAlgo, + const int theDim, + const bool isAux ) { QStringList aHypList; @@ -201,20 +203,14 @@ namespace SMESH{ InitAvailableHypotheses(); // fill list of hypotheses/algorithms + THypothesisDataMap* pMap = isAlgo ? &myAlgorithmsMap : &myHypothesesMap; THypothesisDataMap::iterator anIter; - if (isAlgo) { - anIter = myAlgorithmsMap.begin(); - for (; anIter != myAlgorithmsMap.end(); anIter++) { - aHypList.append(((*anIter).first).c_str()); - } - } - else { - anIter = myHypothesesMap.begin(); - for (; anIter != myHypothesesMap.end(); anIter++) { - aHypList.append(((*anIter).first).c_str()); - } + for ( anIter = pMap->begin(); anIter != pMap->end(); anIter++ ) + { + HypothesisData* aData = (*anIter).second; + if ( ( theDim < 0 || aData->Dim.contains( theDim ) ) && aData->IsAux == isAux ) + aHypList.append(((*anIter).first).c_str()); } - return aHypList; } @@ -254,9 +250,8 @@ namespace SMESH{ // 2. Get names of plugin libraries HypothesisData* aHypData = GetHypothesisData(aHypType); - if (!aHypData) { - return aCreator; - } + if (!aHypData) + return aCreator; QString aClientLibName = aHypData->ClientLibName; QString aServerLibName = aHypData->ServerLibName;