| 267 | |
| 268 | |
| 269 | std::vector<DocumentObject*> |
| 270 | GeoFeatureGroupExtension::getScopedObjectsFromLinks(const DocumentObject* obj, LinkScope scope) |
| 271 | { |
| 272 | |
| 273 | if (!obj) { |
| 274 | return {}; |
| 275 | } |
| 276 | |
| 277 | // we get all linked objects. We can't use outList() as this includes the links from expressions |
| 278 | std::vector<App::DocumentObject*> result; |
| 279 | std::vector<App::Property*> list; |
| 280 | obj->getPropertyList(list); |
| 281 | for (App::Property* prop : list) { |
| 282 | auto vec = getScopedObjectsFromLink(prop, scope); |
| 283 | result.insert(result.end(), vec.begin(), vec.end()); |
| 284 | } |
| 285 | |
| 286 | // clear all null objects and duplicates |
| 287 | std::sort(result.begin(), result.end()); |
| 288 | result.erase(std::unique(result.begin(), result.end()), result.end()); |
| 289 | |
| 290 | return result; |
| 291 | } |
| 292 | |
| 293 | std::vector<DocumentObject*> GeoFeatureGroupExtension::getScopedObjectsFromLink(App::Property* prop, |
| 294 | LinkScope scope) |
nothing calls this directly
no test coverage detected