]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
OperationPrs: do not visualize parameters of feature, if they are not inCase. Example...
authornds <nds@opencascade.com>
Sun, 6 Sep 2015 11:08:48 +0000 (14:08 +0300)
committernds <nds@opencascade.com>
Sun, 6 Sep 2015 11:08:48 +0000 (14:08 +0300)
src/PartSet/PartSet_OperationPrs.cpp
src/PartSet/PartSet_OperationPrs.h

index 3eae8f9a32260496190a80e15c15290ad9526af5..d82056999f572f2dea2887eef049b1fad3b3ba78 100755 (executable)
@@ -20,7 +20,8 @@
 #include <ModelAPI_AttributeSelection.h>
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_AttributeRefList.h>
-
+#include <ModelAPI_Validator.h>
+#include <ModelAPI_Session.h>
 
 #include <GeomValidators_Tools.h>
 
@@ -56,10 +57,10 @@ void PartSet_OperationPrs::setFeature(const FeaturePtr& theFeature)
   updateShapes();
 }
 
-bool PartSet_OperationPrs::dependOn(const ObjectPtr& theResult)
+/*bool PartSet_OperationPrs::dependOn(const ObjectPtr& theResult)
 {
   return myFeatureShapes.contains(theResult);
-}
+}*/
 
 void PartSet_OperationPrs::updateShapes()
 {
@@ -185,6 +186,8 @@ void PartSet_OperationPrs::getFeatureShapes(QMap<ObjectPtr, QList<GeomShapePtr>
   if (!myFeature.get())
     return;
 
+  ModelAPI_ValidatorsFactory* aValidators = ModelAPI_Session::get()->validators();
+
   QList<GeomShapePtr> aShapes;
   std::list<AttributePtr> anAttributes = myFeature->data()->attributes("");
   std::list<AttributePtr>::const_iterator anIt = anAttributes.begin(), aLast = anAttributes.end();
@@ -193,6 +196,9 @@ void PartSet_OperationPrs::getFeatureShapes(QMap<ObjectPtr, QList<GeomShapePtr>
     if (!isSelectionAttribute(anAttribute))
       continue;
 
+    if (!aValidators->isCase(myFeature, anAttribute->id()))
+      continue; // this attribute is not participated in the current case
+
     std::string anAttrType = anAttribute->attributeType();
 
     if (anAttrType == ModelAPI_AttributeSelectionList::typeId()) {
index 935e4936d112f84a5002f0fc7241c13b763bd309..20078787dcb3fdd358ae85c46dfd816a72847397 100755 (executable)
@@ -55,7 +55,7 @@ public:
   void setFeature(const FeaturePtr& theFeature);
 
   /// Returns true if the presentation 
-  bool dependOn(const ObjectPtr& theObject);
+  //bool dependOn(const ObjectPtr& theObject);
 
   // Recompute internal list of shaped dependent on the current feature
   void updateShapes();