Don't run insideArea on ruleAreas.
Fixes https://gitlab.com/kicad/code/kicad/issues/7826
This commit is contained in:
parent
e0cbcc3330
commit
47145d349b
|
@ -244,7 +244,7 @@ public:
|
|||
* position.
|
||||
*/
|
||||
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 );
|
||||
|
||||
|
|
|
@ -106,6 +106,14 @@ bool DRC_TEST_PROVIDER_DISALLOW::Run()
|
|||
if( m_drcEngine->IsErrorLimitExceeded( DRCE_ALLOWED_ITEMS ) )
|
||||
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 );
|
||||
doCheckItem( item );
|
||||
|
||||
|
|
|
@ -355,12 +355,12 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
|
||||
DRC_RTREE* itemRTree = board->m_CopperZoneRTrees[ itemZone ].get();
|
||||
|
||||
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||
if( itemRTree )
|
||||
{
|
||||
if( itemRTree->QueryColliding( zone->GetCachedBoundingBox(), &zoneOutline,
|
||||
layer, 0, nullptr, nullptr ) )
|
||||
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||
{
|
||||
return true;
|
||||
if( itemRTree->QueryColliding( itemBBox, &zoneOutline, layer, 0 ) )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue