switch linear pattern to coordinate system axis

This commit is contained in:
Stefan Tröger
2015-05-07 06:53:41 +02:00
parent 8af2eeb245
commit 616e372e4a
8 changed files with 98 additions and 32 deletions

View File

@@ -109,12 +109,16 @@ DocumentObject *GeoFeatureGroup::getObject(const char *Name) const
return 0;
}
bool GeoFeatureGroup::hasObject(const DocumentObject* obj) const
bool GeoFeatureGroup::hasObject(const DocumentObject* obj, bool recursive) const
{
const std::vector<DocumentObject*>& grp = Items.getValues();
for (std::vector<DocumentObject*>::const_iterator it = grp.begin(); it != grp.end(); ++it) {
if (*it == obj)
return true;
if (recursive && (*it)->getTypeId().isDerivedFrom(GeoFeatureGroup::getClassTypeId())) {
if (this->hasObject(static_cast<GeoFeatureGroup*>(*it), recursive))
return true;
}
}
return false;