Make sure we have footprint courtyards before depending on DRC rules.

Fixes https://gitlab.com/kicad/code/kicad/issues/8291
This commit is contained in:
Jeff Young 2021-04-25 12:44:30 +01:00
parent 1e8b23402c
commit eb85836234
2 changed files with 5 additions and 2 deletions

View File

@ -134,8 +134,8 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( ZONE* aZone )
if( zones_to_refill.size() )
{
ZONE_FILLER filler( GetBoard(), &commit );
wxString title =
wxString::Format( _( "Refill %d Zones" ), (int) zones_to_refill.size() );
wxString title = wxString::Format( _( "Refill %d Zones" ),
(int) zones_to_refill.size() );
filler.InstallNewProgressReporter( this, title, 4 );
if( !filler.Fill( zones_to_refill ) )

View File

@ -135,6 +135,9 @@ bool ZONE_FILLER::Fill( std::vector<ZONE*>& aZones, bool aCheck, wxWindow* aPare
zone->CacheBoundingBox();
m_worstClearance = std::max( m_worstClearance, zone->GetLocalClearance() );
}
// Rules may depend on insideCourtyard() or other expressions
footprint->BuildPolyCourtyards();
}
// Sort by priority to reduce deferrals waiting on higher priority zones.