From: nds Date: Tue, 7 Jul 2015 08:27:09 +0000 (+0300) Subject: Sub objects should not be visualized as the preview of the current operation. X-Git-Tag: V_1.3.0~90^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d15792ed650ae0e82df7aa4aadeaaf553f69435a;p=modules%2Fshaper.git Sub objects should not be visualized as the preview of the current operation. --- diff --git a/src/PartSet/PartSet_OperationPrs.cpp b/src/PartSet/PartSet_OperationPrs.cpp index 136901071..b4a5fb5a1 100755 --- a/src/PartSet/PartSet_OperationPrs.cpp +++ b/src/PartSet/PartSet_OperationPrs.cpp @@ -114,6 +114,16 @@ bool PartSet_OperationPrs::isVisible(XGUI_Displayer* theDisplayer, const ObjectP return aVisible; } +bool isSubObject(const ObjectPtr& theObject, const FeaturePtr& theFeature) +{ + bool isSub = false; + CompositeFeaturePtr aComposite = std::dynamic_pointer_cast(theFeature); + if (aComposite.get()) + isSub = aComposite->isSub(theObject); + + return isSub; +} + void addValue(const ObjectPtr& theObject, const GeomShapePtr& theShape, QMap >& theObjectShapes) { @@ -150,7 +160,8 @@ void PartSet_OperationPrs::getFeatureShapes(QMap GeomShapePtr aShape = aSelAttribute->value(); if (!aShape.get()) aShape = aResult->shape(); - addValue(aResult, aShape, theObjectShapes); + if (!isSubObject(aResult, myFeature)) + addValue(aResult, aShape, theObjectShapes); } } else { @@ -186,7 +197,8 @@ void PartSet_OperationPrs::getFeatureShapes(QMap if (aResult.get()) aShape = aResult->shape(); } - addValue(anObject, aShape, theObjectShapes); + if (!isSubObject(anObject, myFeature)) + addValue(anObject, aShape, theObjectShapes); } } }