diff --git a/pcbnew/pcb_expr_evaluator.cpp b/pcbnew/pcb_expr_evaluator.cpp index f8b8fc958f..df40db91fd 100644 --- a/pcbnew/pcb_expr_evaluator.cpp +++ b/pcbnew/pcb_expr_evaluator.cpp @@ -185,17 +185,10 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self ) if( zone ) { - const SHAPE_POLY_SET* zonePoly; - SHAPE_POLY_SET testPoly; - - // Do a layer-specific test if we can; otherwise a general outline test - if( zone->GetLayerSet().test( context->GetLayer() ) ) - zonePoly = &zone->GetFilledPolysList( context->GetLayer() ); - else - zonePoly = zone->Outline(); + SHAPE_POLY_SET testPoly; item->TransformShapeWithClearanceToPolygon( testPoly, context->GetLayer(), 0 ); - testPoly.BooleanIntersection( *zonePoly, SHAPE_POLY_SET::PM_FAST ); + testPoly.BooleanIntersection( *zone->Outline(), SHAPE_POLY_SET::PM_FAST ); if( testPoly.OutlineCount() ) result->Set( 1.0 ); diff --git a/pcbnew/tools/zone_filler_tool.cpp b/pcbnew/tools/zone_filler_tool.cpp index 192dbef6c0..aa5b52a544 100644 --- a/pcbnew/tools/zone_filler_tool.cpp +++ b/pcbnew/tools/zone_filler_tool.cpp @@ -163,7 +163,7 @@ int ZONE_FILLER_TOOL::ZoneUnfill( const TOOL_EVENT& aEvent ) { BOARD_COMMIT commit( this ); - for( auto item : selection() ) + for( EDA_ITEM* item : selection() ) { assert( item->Type() == PCB_ZONE_AREA_T ); @@ -186,7 +186,7 @@ int ZONE_FILLER_TOOL::ZoneUnfillAll( const TOOL_EVENT& aEvent ) { BOARD_COMMIT commit( this ); - for ( auto zone : board()->Zones() ) + for( ZONE_CONTAINER* zone : board()->Zones() ) { commit.Modify( zone );