From a3dcdd488705d86562444b31241572b8c2920d1d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 26 Sep 2021 19:25:49 +0100 Subject: [PATCH] Allow highlight-net to work on zone copper. We were already checking zones separately (after tracks and pads); we just weren't setting the flag that causes the COLLECTOR to also test zone fills. Fixes https://gitlab.com/kicad/code/kicad/issues/5924 --- pcbnew/tools/board_inspection_tool.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index 9226be2657..89a27a0da4 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -908,9 +908,9 @@ int BOARD_INSPECTION_TOOL::HighlightItem( const TOOL_EVENT& aEvent ) const PCB_SELECTION& selection = selectionTool->GetSelection(); std::set netcodes; - for( auto item : selection ) + for( EDA_ITEM* item : selection ) { - if( auto ci = dyn_cast( item ) ) + if( BOARD_CONNECTED_ITEM* ci = dynamic_cast( item ) ) netcodes.insert( ci->GetNetCode() ); } @@ -941,12 +941,12 @@ int BOARD_INSPECTION_TOOL::HighlightItem( const TOOL_EVENT& aEvent ) if( net < 0 ) { GENERAL_COLLECTORS_GUIDE guide = m_frame->GetCollectorsGuide(); - GENERAL_COLLECTOR collector; + guide.SetIgnoreZoneFills( false ); PCB_LAYER_ID activeLayer = static_cast( view()->GetTopLayer() ); guide.SetPreferredLayer( activeLayer ); - // Find a connected item for which we are going to highlight a net + GENERAL_COLLECTOR collector; collector.Collect( board, GENERAL_COLLECTOR::PadsOrTracks, (wxPoint) aPosition, guide ); if( collector.GetCount() == 0 )