Zone filler: fix missing calculation of filled polygons when fill mode is ZFM::SEGMENTS

This commit is contained in:
jean-pierre charras 2019-04-10 17:49:40 +02:00
parent bb779b237a
commit 9fc7281fab
1 changed files with 5 additions and 8 deletions

View File

@ -131,6 +131,11 @@ bool ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*> aZones, bool aCheck )
for( size_t i = nextItem++; i < toFill.size(); i = nextItem++ ) for( size_t i = nextItem++; i < toFill.size(); i = nextItem++ )
{ {
ZONE_CONTAINER* zone = toFill[i].m_zone; ZONE_CONTAINER* zone = toFill[i].m_zone;
SHAPE_POLY_SET rawPolys, finalPolys;
fillSingleZone( zone, rawPolys, finalPolys );
zone->SetRawPolysList( rawPolys );
zone->SetFilledPolysList( finalPolys );
if( zone->GetFillMode() == ZFM_SEGMENTS ) if( zone->GetFillMode() == ZFM_SEGMENTS )
{ {
@ -138,14 +143,6 @@ bool ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*> aZones, bool aCheck )
fillZoneWithSegments( zone, zone->GetFilledPolysList(), segFill ); fillZoneWithSegments( zone, zone->GetFilledPolysList(), segFill );
zone->SetFillSegments( segFill ); zone->SetFillSegments( segFill );
} }
else
{
SHAPE_POLY_SET rawPolys, finalPolys;
fillSingleZone( zone, rawPolys, finalPolys );
zone->SetRawPolysList( rawPolys );
zone->SetFilledPolysList( finalPolys );
}
zone->SetIsFilled( true ); zone->SetIsFilled( true );