From 6b75f589e94315f7c0ee0c11906ef5f4004ade23 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 10 Jan 2019 06:17:37 -0800 Subject: [PATCH] pcbnew: Do not remove islands from no-net zones No net zones, by definition, do not connect to any other element. Therefore, the entire net is an island and should not be removed by the knockout section Fixes: lp:1811239 * https://bugs.launchpad.net/kicad/+bug/1811239 --- pcbnew/zone_filler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 31f9ebf351..689650b63c 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -191,6 +191,10 @@ bool ZONE_FILLER::Fill( std::vector aZones, bool aCheck ) for( auto& zone : toFill ) { + // Non-net zones do not have islands by definition + if( zone.m_zone->GetNetCode() <= 0 ) + continue; + std::sort( zone.m_islands.begin(), zone.m_islands.end(), std::greater() ); SHAPE_POLY_SET poly = zone.m_zone->GetFilledPolysList();