36 if( !zone->GetIsRuleArea() && !zone->IsTeardropArea() && zone->IsOnCopperLayer() )
38 auto zone_clone = std::shared_ptr<ZONE>(
static_cast<ZONE*
>( zone->Clone() ) );
52 std::sort( sortedClonedZones.begin(), sortedClonedZones.end(),
55 return l->HigherPriority( r );
58 unsigned currentPriority = sortedClonedZones.size() - 1;
60 for(
ZONE* zone : sortedClonedZones )
62 m_zonePriorities[zone] = std::make_pair<>( currentPriority, currentPriority );
70 m_zoneSettings[aZone] = std::make_shared<ZONE_SETTINGS>( *aSettings );
111 bool priorityChanged =
false;
117 priorityChanged =
true;
122 if( priorityChanged )
Information pertinent to a Pcbnew printed circuit board.
const ZONES & Zones() const
void SetZonePriority(ZONE *aClone, unsigned aPriority)
Update the tracked priority for a cloned zone.
unsigned GetZonePriority(ZONE *aZone)
ZONE_SETTINGS_BAG()=default
std::unordered_map< ZONE *, std::shared_ptr< ZONE > > m_zonesCloneMap
void UpdateClonedZones()
The cloned list is the working storage.
std::vector< ZONE * > m_clonedZoneList
void SwapPriority(ZONE *aZOne, ZONE *otherZone)
std::unordered_map< ZONE *, std::shared_ptr< ZONE_SETTINGS > > m_zoneSettings
std::shared_ptr< ZONE_SETTINGS > GetZoneSettings(ZONE *aZone)
std::unordered_map< ZONE *, std::pair< unsigned, unsigned > > m_zonePriorities
ZONE_SETTINGS handles zones parameters.
Handle a list of polygons defining a copper zone.