Skip to content

Commit

Permalink
Fixed an issue with property constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koefferlein committed Mar 23, 2024
1 parent a6d2930 commit 4cacb60
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/db/db/dbDeepRegion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,9 @@ DeepRegion::and_with (const Region &other, PropertyConstraint property_constrain

return AsIfFlatRegion::and_with (other, property_constraint);

} else if (other_deep->deep_layer () == deep_layer ()) {
} else if (other_deep->deep_layer () == deep_layer () && pc_skip (property_constraint)) {

return clone ()->remove_properties (pc_remove (property_constraint));
return clone ();

} else {

Expand All @@ -821,7 +821,7 @@ DeepRegion::not_with (const Region &other, PropertyConstraint property_constrain

return AsIfFlatRegion::not_with (other, property_constraint);

} else if (other_deep->deep_layer () == deep_layer ()) {
} else if (other_deep->deep_layer () == deep_layer () && pc_skip (property_constraint)) {

return new DeepRegion (deep_layer ().derived ());

Expand All @@ -833,10 +833,10 @@ DeepRegion::not_with (const Region &other, PropertyConstraint property_constrain
}

RegionDelegate *
DeepRegion::or_with (const Region &other, db::PropertyConstraint /*property_constraint*/) const
DeepRegion::or_with (const Region &other, db::PropertyConstraint property_constraint) const
{
const DeepRegion *other_deep = dynamic_cast <const DeepRegion *> (other.delegate ());
if (other_deep && other_deep->deep_layer () == deep_layer ()) {
if (other_deep && other_deep->deep_layer () == deep_layer () && pc_skip (property_constraint)) {
return clone ();
}

Expand All @@ -862,9 +862,9 @@ DeepRegion::andnot_with (const Region &other, PropertyConstraint property_constr

return AsIfFlatRegion::andnot_with (other, property_constraint);

} else if (other_deep->deep_layer () == deep_layer ()) {
} else if (other_deep->deep_layer () == deep_layer () && pc_skip (property_constraint)) {

return std::make_pair (clone ()->remove_properties (pc_remove (property_constraint)), new DeepRegion (deep_layer ().derived ()));
return std::make_pair (clone (), new DeepRegion (deep_layer ().derived ()));

} else {

Expand Down Expand Up @@ -979,7 +979,7 @@ DeepRegion::xor_with (const Region &other, db::PropertyConstraint property_const

return AsIfFlatRegion::xor_with (other, property_constraint);

} else if (other_deep->deep_layer () == deep_layer ()) {
} else if (other_deep->deep_layer () == deep_layer () && pc_skip (property_constraint)) {

return new DeepRegion (deep_layer ().derived ());

Expand Down

0 comments on commit 4cacb60

Please sign in to comment.