Don't run insideArea on ruleAreas.

Fixes https://gitlab.com/kicad/code/kicad/issues/7826
This commit is contained in:
Jeff Young 2021-03-07 17:54:49 +00:00
parent e0cbcc3330
commit 47145d349b
3 changed files with 13 additions and 5 deletions

View File

@ -244,7 +244,7 @@ public:
* position. * position.
*/ */
bool QueryColliding( EDA_RECT aBox, SHAPE* aRefShape, PCB_LAYER_ID aLayer, int aClearance, bool QueryColliding( EDA_RECT aBox, SHAPE* aRefShape, PCB_LAYER_ID aLayer, int aClearance,
int* aActual, VECTOR2I* aPos ) const int* aActual = nullptr, VECTOR2I* aPos = nullptr ) const
{ {
aBox.Inflate( aClearance ); aBox.Inflate( aClearance );

View File

@ -106,6 +106,14 @@ bool DRC_TEST_PROVIDER_DISALLOW::Run()
if( m_drcEngine->IsErrorLimitExceeded( DRCE_ALLOWED_ITEMS ) ) if( m_drcEngine->IsErrorLimitExceeded( DRCE_ALLOWED_ITEMS ) )
return false; return false;
if( item->Type() == PCB_ZONE_T || item->Type() == PCB_FP_ZONE_T )
{
ZONE* zone = static_cast<ZONE*>( item );
if( zone->GetIsRuleArea() )
return true;
}
item->ClearFlags( HOLE_PROXY ); item->ClearFlags( HOLE_PROXY );
doCheckItem( item ); doCheckItem( item );

View File

@ -355,11 +355,11 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self )
DRC_RTREE* itemRTree = board->m_CopperZoneRTrees[ itemZone ].get(); DRC_RTREE* itemRTree = board->m_CopperZoneRTrees[ itemZone ].get();
if( itemRTree )
{
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() ) for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
{ {
if( itemRTree->QueryColliding( zone->GetCachedBoundingBox(), &zoneOutline, if( itemRTree->QueryColliding( itemBBox, &zoneOutline, layer, 0 ) )
layer, 0, nullptr, nullptr ) )
{
return true; return true;
} }
} }