Browse Source

pcbnew: prevent different keepout zones from merging

Keepout zones can have different layer sets and different restrictions
that should not be combined unless they are identical.

( cherry-picked from a67bfa620 )
Fixes: lp:1789062
* https://bugs.launchpad.net/kicad/+bug/1789062
pull/13/head
Seth Hillbrand 7 years ago
parent
commit
44b4f8a104
  1. 17
      pcbnew/zones_test_and_combine_areas.cpp

17
pcbnew/zones_test_and_combine_areas.cpp

@ -172,8 +172,8 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test )
if( area_to_test == area2 )
continue;
// see if areas are on same layer
if( area_to_test->GetLayer() != area2->GetLayer() )
// see if areas are on same layers
if( area_to_test->GetLayerSet() != area2->GetLayerSet() )
continue;
// test for different priorities
@ -184,6 +184,19 @@ bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test )
if( area_to_test->GetIsKeepout() != area2->GetIsKeepout() )
continue;
// Keepout area-specific tests
if( area_to_test->GetIsKeepout() )
{
if( area_to_test->GetDoNotAllowCopperPour() != area2->GetDoNotAllowCopperPour() )
continue;
if( area_to_test->GetDoNotAllowTracks() != area2->GetDoNotAllowTracks() )
continue;
if( area_to_test->GetDoNotAllowVias() != area2->GetDoNotAllowVias() )
continue;
}
if( TestAreaIntersection( area_to_test, area2 ) )
return true;
}

Loading…
Cancel
Save