From: nds Date: Mon, 2 Feb 2015 06:25:06 +0000 (+0300) Subject: Issue #393 wrong sketch presentation X-Git-Tag: V_1.0.0~1^2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b86a81dd1f7bea625cdb4e882c32b80836985550;p=modules%2Fshaper.git Issue #393 wrong sketch presentation --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index b05715c38..253514b35 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -190,15 +190,26 @@ void PartSet_Module::operationStopped(ModuleBase_Operation* theOperation) bool PartSet_Module::canDisplayObject(const ObjectPtr& theObject) const { bool aCanDisplay = false; - if (mySketchMgr->activeSketch()) { + CompositeFeaturePtr aSketchFeature = mySketchMgr->activeSketch(); + if (aSketchFeature.get() != NULL) { FeaturePtr aFeature = ModelAPI_Feature::feature(theObject); if (aFeature.get() != NULL) { - if (aFeature == mySketchMgr->activeSketch()) { + if (aFeature == aSketchFeature) { aCanDisplay = false; } else { - aCanDisplay = mySketchMgr->sketchOperationIdList().contains(aFeature->getKind().c_str()); + for (int i = 0; i < aSketchFeature->numberOfSubs() && !aCanDisplay; i++) { + FeaturePtr aSubFeature = aSketchFeature->subFeature(i); + std::list aResults = aSubFeature->results(); + std::list::const_iterator aIt; + for (aIt = aResults.begin(); aIt != aResults.end() && !aCanDisplay; ++aIt) { + if (theObject == (*aIt)) + aCanDisplay = true; + } + if (aSubFeature == theObject) + aCanDisplay = true; + } } } }