diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 393a72e578..58350da91f 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -474,6 +474,27 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWindow* aPare // for( CN_ZONE_ISOLATED_ISLAND_LIST& zone : islandsList ) { + // If *all* the polygons are islands, do not remove any of them + bool allIslands = true; + + for( PCB_LAYER_ID layer : zone.m_zone->GetLayerSet().Seq() ) + { + if( !zone.m_islands.count( layer ) ) + continue; + + std::vector& islands = zone.m_islands.at( layer ); + std::shared_ptr poly = zone.m_zone->GetFilledPolysList( layer ); + + if( islands.size() != static_cast( poly->OutlineCount() ) ) + { + allIslands = false; + break; + } + } + + if( allIslands ) + continue; + for( PCB_LAYER_ID layer : zone.m_zone->GetLayerSet().Seq() ) { if( m_debugZoneFiller && LSET::InternalCuMask().Contains( layer ) ) diff --git a/pcbnew/zone_settings.cpp b/pcbnew/zone_settings.cpp index bca1323f28..91de6549b5 100644 --- a/pcbnew/zone_settings.cpp +++ b/pcbnew/zone_settings.cpp @@ -71,7 +71,7 @@ ZONE_SETTINGS::ZONE_SETTINGS() m_cornerSmoothingType = SMOOTHING_NONE; m_cornerRadius = 0; - m_removeIslands = ISLAND_REMOVAL_MODE::AREA; + m_removeIslands = ISLAND_REMOVAL_MODE::ALWAYS; m_minIslandArea = 10 * pcbIUScale.IU_PER_MM * pcbIUScale.IU_PER_MM; SetIsRuleArea( false );