From dc1c80beb8b777c61ccdfe2fc12c973c7b47fe8f Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 20 Dec 2020 11:24:19 -0500 Subject: [PATCH] Allow highlighting from locked items Fixes https://gitlab.com/kicad/code/kicad/-/issues/6758 --- pcbnew/tools/board_inspection_tool.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index bbe15ae086..7dee0ada96 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -754,9 +754,17 @@ int BOARD_INSPECTION_TOOL::HighlightItem( const TOOL_EVENT& aEvent ) if( collector.GetCount() == 0 ) collector.Collect( board, GENERAL_COLLECTOR::Zones, (wxPoint) aPosition, guide ); - // Apply the active selection filter + // Apply the active selection filter, except we want to allow picking locked items for + // highlighting even if the user has disabled them for selection + SELECTION_FILTER_OPTIONS& filter = selectionTool->GetFilter(); + + bool saved = filter.lockedItems; + filter.lockedItems = true; + selectionTool->FilterCollectedItems( collector ); + filter.lockedItems = saved; + // Clear the previous highlight m_frame->SendMessageToEESCHEMA( nullptr );