Salome HOME
IPAL52704: TC7.6.0: "Modification of orientation" don't work on volumes
authoreap <eap@opencascade.com>
Fri, 24 Apr 2015 17:21:56 +0000 (20:21 +0300)
committereap <eap@opencascade.com>
Fri, 24 Apr 2015 17:21:56 +0000 (20:21 +0300)
IPAL52711: TC7.6.0: "Tolerance" spinbox is inactive in the "Selection filter library" dialog box

src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx

index c2f4bd6e2fa145b34f1aa53bb15398e5f9f66431..4e39b5da5d9a2acd1f9e31e84768304598a6248e 100755 (executable)
@@ -1559,19 +1559,29 @@ void SMESHGUI_FilterTable::updateAdditionalWidget()
 
   ComboItem* anItem = ((ComboItem*)aTable->item(aRow, 0));
   int aCriterion = GetCriterionType(aRow);
-  bool toEnable = ((((ComboItem*)aTable->item(aRow, 1))->value() == SMESH::FT_EqualTo &&
-                   aCriterion != SMESH::FT_RangeOfIds &&
-                   aCriterion != SMESH::FT_FreeEdges &&
-                   aCriterion != SMESH::FT_FreeFaces &&
-                   aCriterion != SMESH::FT_BadOrientedVolume &&
-                   aCriterion != SMESH::FT_BareBorderFace &&
-                   aCriterion != SMESH::FT_BareBorderVolume &&
-                   aCriterion != SMESH::FT_OverConstrainedFace &&
-                   aCriterion != SMESH::FT_OverConstrainedVolume)
-                   ||
-                   aCriterion == SMESH::FT_CoplanarFaces ||
+  bool isDbl = ( aCriterion == SMESH::FT_AspectRatio        ||
+                 aCriterion == SMESH::FT_AspectRatio3D      ||
+                 aCriterion == SMESH::FT_Warping            ||
+                 aCriterion == SMESH::FT_MinimumAngle       ||
+                 aCriterion == SMESH::FT_Taper              ||
+                 aCriterion == SMESH::FT_Skew               ||
+                 aCriterion == SMESH::FT_Area               ||
+                 aCriterion == SMESH::FT_Volume3D           ||
+                 aCriterion == SMESH::FT_MaxElementLength2D ||
+                 aCriterion == SMESH::FT_MaxElementLength3D ||
+                 aCriterion == SMESH::FT_Length             ||
+                 aCriterion == SMESH::FT_Length2D           ||
+                 aCriterion == SMESH::FT_BallDiameter );
+
+  bool toEnable = (( isDbl && ((ComboItem*)aTable->item(aRow, 1))->value() == SMESH::FT_EqualTo) ||
+                   aCriterion == SMESH::FT_BelongToPlane                                         ||
+                   aCriterion == SMESH::FT_BelongToCylinder                                      ||
+                   aCriterion == SMESH::FT_BelongToGenSurface                                    ||
+                   aCriterion == SMESH::FT_BelongToGeom                                          ||
+                   aCriterion == SMESH::FT_LyingOnGeom                                           ||
+                   aCriterion == SMESH::FT_CoplanarFaces                                         ||
                    aCriterion == SMESH::FT_EqualNodes);
-  
+
   if (!myAddWidgets.contains(anItem))
   {
     myAddWidgets[ anItem ] = new AdditionalWidget(myWgStack);
index 6c05668aea298eb1dc02006299b578caec4dbbe8..018006f27c36a1f6046c0be6a9e5a8ebda637942 100755 (executable)
@@ -1079,7 +1079,7 @@ bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEdit
 
 int SMESHGUI_ChangeOrientationDlg::nbElemsInMesh()
 {
-  return ( myFilterType = SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes();
+  return ( myFilterType == SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes();
 }
 
 /*!