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.

Fixes: lp:1789062
* https://bugs.launchpad.net/kicad/+bug/1789062
This commit is contained in:
Seth Hillbrand 2018-09-16 13:54:43 -07:00
parent a454adb3ba
commit a67bfa6207
1 changed files with 15 additions and 2 deletions

View File

@ -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;
}