]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
INT PAL 0052778: Algorithms of SMESH plugins have incorrect set of hypotheses
authorimn <imn@opencascade.com>
Mon, 22 Jun 2015 12:06:00 +0000 (15:06 +0300)
committerimn <imn@opencascade.com>
Mon, 22 Jun 2015 12:06:00 +0000 (15:06 +0300)
src/SMESHGUI/SMESHGUI_MeshOp.cxx

index 708e7f40d032a21540087d1cdc3929c7fc047ef6..ff98510088ead389874ccd87465f2a6b73ff0816 100644 (file)
@@ -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 );