Fix typo which leads to catastrophic performance on boards with tons of zones.
(cherry picked from commit 392a3ec131
)
This commit is contained in:
parent
14378812be
commit
47de9f8f04
|
@ -440,9 +440,10 @@ bool calcIsInsideArea( BOARD_ITEM* aItem, const EDA_RECT& aItemBBox, PCB_EXPR_CO
|
|||
ZONE* aArea )
|
||||
{
|
||||
BOARD* board = aArea->GetBoard();
|
||||
EDA_RECT areaBBox = aArea->GetBoundingBox();
|
||||
std::shared_ptr<SHAPE> shape;
|
||||
|
||||
if( !aArea->GetBoundingBox().Intersects( aItemBBox ) )
|
||||
if( !areaBBox.Intersects( aItemBBox ) )
|
||||
return false;
|
||||
|
||||
// Collisions include touching, so we need to deflate outline by enough to exclude it.
|
||||
|
@ -546,7 +547,7 @@ bool calcIsInsideArea( BOARD_ITEM* aItem, const EDA_RECT& aItemBBox, PCB_EXPR_CO
|
|||
{
|
||||
if( aCtx->GetLayer() == layer || aCtx->GetLayer() == UNDEFINED_LAYER )
|
||||
{
|
||||
if( zoneRTree->QueryColliding( aItemBBox, &areaOutline, layer ) )
|
||||
if( zoneRTree->QueryColliding( areaBBox, &areaOutline, layer ) )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue