+#ifdef DEBUG_DO_NOT_ACTIVATE_SUB_FEATURE
+ FeaturePtr anObjectFeature = ModelAPI_Feature::feature(theObj);
+ std::list<AttributePtr> anAttributes = aFeature->data()->attributes(
+ ModelAPI_AttributeRefList::typeId());
+ std::list<AttributePtr>::const_iterator anIt = anAttributes.begin(), aLast = anAttributes.end();
+ bool aFoundObject = false;
+ for (; anIt != aLast && !aFoundObject; anIt++) {
+ std::shared_ptr<ModelAPI_AttributeRefList> aCurSelList =
+ std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(*anIt);
+ for (int i = 0, aNb = aCurSelList->size(); i < aNb && !aFoundObject; i++) {
+ ObjectPtr anObject = aCurSelList->object(i);
+ FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anObject);
+ if (aFeature.get()) {
+ aFoundObject = anObjectFeature == aFeature;
+ }
+ }
+ }
+ return aFoundObject;
+#endif