From: nds Date: Sun, 6 Sep 2015 11:08:48 +0000 (+0300) Subject: OperationPrs: do not visualize parameters of feature, if they are not inCase. Example... X-Git-Tag: V_1.4.0_beta4~109 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=32442a4f43da44e368f092d64e4004e020c5bfba;p=modules%2Fshaper.git OperationPrs: do not visualize parameters of feature, if they are not inCase. Example: Extrusion, select a plane in the 2nd choice, activate 1st choice, the plane should not be marked in the viewer. --- diff --git a/src/PartSet/PartSet_OperationPrs.cpp b/src/PartSet/PartSet_OperationPrs.cpp index 3eae8f9a3..d82056999 100755 --- a/src/PartSet/PartSet_OperationPrs.cpp +++ b/src/PartSet/PartSet_OperationPrs.cpp @@ -20,7 +20,8 @@ #include #include #include - +#include +#include #include @@ -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 if (!myFeature.get()) return; + ModelAPI_ValidatorsFactory* aValidators = ModelAPI_Session::get()->validators(); + QList aShapes; std::list anAttributes = myFeature->data()->attributes(""); std::list::const_iterator anIt = anAttributes.begin(), aLast = anAttributes.end(); @@ -193,6 +196,9 @@ void PartSet_OperationPrs::getFeatureShapes(QMap 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()) { diff --git a/src/PartSet/PartSet_OperationPrs.h b/src/PartSet/PartSet_OperationPrs.h index 935e4936d..20078787d 100755 --- a/src/PartSet/PartSet_OperationPrs.h +++ b/src/PartSet/PartSet_OperationPrs.h @@ -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();