Extended context filter inward test case to larger radius (#274)

This commit is contained in:
Bartek Kryza
2024-06-13 17:29:34 +02:00
parent bd921822c2
commit 30337c1aa3
4 changed files with 34 additions and 7 deletions

View File

@@ -516,9 +516,10 @@ private:
// which have a relationship to any of the effective_context
// elements
for (const relationship &rel : el.get().relationships()) {
if (context_cfg.direction ==
config::context_direction_t::outward/* &&
!is_inward(rel.type())*/) {
// At the moment aggregation and composition are added in the
// model in reverse direction so we don't consider them here
if (rel.type() == relationship_t::kAggregation ||
rel.type() == relationship_t::kComposition) {
continue;
}
@@ -532,7 +533,6 @@ private:
// Now search current effective_context elements and add any
// elements of any type in the diagram which have a relationship
// to that element
for (const auto element_id : effective_context) {
const auto &maybe_element = cd.get(element_id);
@@ -547,6 +547,12 @@ private:
rel.type() != relationship_t::kComposition)) {
continue;
}
if (context_cfg.direction ==
config::context_direction_t::outward &&
(rel.type() == relationship_t::kAggregation ||
rel.type() == relationship_t::kComposition)) {
continue;
}
if (d.should_include(rel.type()) &&
rel.destination() == el.get().id())