Areas might have layers defined in area as well as rule.

Fixes https://gitlab.com/kicad/code/kicad/issues/12584
This commit is contained in:
Jeff Young 2022-10-07 23:48:53 +01:00
parent 79dabdd484
commit 51c20da93e
1 changed files with 6 additions and 0 deletions

View File

@ -629,6 +629,9 @@ static void intersectsAreaFunc( LIBEVAL::CONTEXT* aCtx, void* self )
if( !aArea || aArea == item || aArea->GetParent() == item )
return false;
if( !( aArea->GetLayerSet() & item->GetLayerSet() ).any() )
return false;
if( !aArea->GetBoundingBox().Intersects( itemBBox ) )
return false;
@ -692,6 +695,9 @@ static void enclosedByAreaFunc( LIBEVAL::CONTEXT* aCtx, void* self )
if( !aArea || aArea == item || aArea->GetParent() == item )
return false;
if( !( aArea->GetLayerSet() & item->GetLayerSet() ).any() )
return false;
if( !aArea->GetBoundingBox().Intersects( itemBBox ) )
return false;