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

Fixes https://gitlab.com/kicad/code/kicad/issues/12584

(cherry picked from commit 51c20da93e)
This commit is contained in:
Jeff Young 2022-10-07 23:48:53 +01:00
parent 6390633a7b
commit 6003097411
1 changed files with 3 additions and 0 deletions

View File

@ -576,6 +576,9 @@ bool isInsideArea( BOARD_ITEM* aItem, const EDA_RECT& aItemBBox, PCB_EXPR_CONTEX
if( !aArea || aArea == aItem || aArea->GetParent() == aItem )
return false;
if( !( aArea->GetLayerSet() & aItem->GetLayerSet() ).any() )
return false;
BOARD* board = aArea->GetBoard();
std::unique_lock<std::mutex> cacheLock( board->m_CachesMutex );
PCB_LAYER_ID layer = aCtx->GetLayer();