+ if (!anAttrIter->second.empty())
+ return;
+
+ // Check there is no features containing such attribute
+ MapFeatureConstraint::iterator aFeatIter = myFeatures.begin();
+ for (; aFeatIter != myFeatures.end(); aFeatIter++) {
+ DataPtr aData = aFeatIter->first->data();
+ if (!aData || !aData->isValid())
+ continue;
+ std::list<AttributePtr> anAttrList = aData->attributes(GeomDataAPI_Point2D::typeId());
+ std::list<AttributePtr>::iterator anAtIt = anAttrList.begin();
+ for (; anAtIt != anAttrList.end(); anAtIt++) {
+ std::shared_ptr<GeomDataAPI_Point2D> aPoint =
+ std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anAtIt);
+ if (aPoint == theAttribute)
+ anAttrIter->second.insert(aFeatIter->first);
+ }
+ }