diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index b2c3cf4bb3..dfd2ab69c5 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -180,6 +180,14 @@ EDA_ITEM* ZONE::Clone() const bool ZONE::HigherPriority( const ZONE* aOther ) const { + // Teardrops are always higher priority than regular zones, so if one zone is a teardrop + // and the other is not, then return higher priority as the teardrop + if( ( m_teardropType == TEARDROP_TYPE::TD_NONE ) + ^ ( aOther->m_teardropType == TEARDROP_TYPE::TD_NONE ) ) + { + return static_cast( m_teardropType ) > static_cast( aOther->m_teardropType ); + } + if( m_priority != aOther->m_priority ) return m_priority > aOther->m_priority;