Avoid teardrops in priority calculation

When choosing a new priority value, don't look at teardrops (which have
high priority)
This commit is contained in:
Seth Hillbrand 2022-08-25 08:39:55 -07:00
parent c6defadb78
commit 418df36790
1 changed files with 4 additions and 1 deletions

View File

@ -75,7 +75,10 @@ std::unique_ptr<ZONE> ZONE_CREATE_HELPER::createNewZone( bool aKeepout )
unsigned priority = 0;
for( ZONE* zone : board->Zones() )
{
if( zone->GetTeardropAreaType() == TEARDROP_TYPE::TD_NONE )
priority = std::max( priority, zone->GetAssignedPriority() );
}
zoneInfo.m_ZonePriority = static_cast<int>( priority + 1 );
}