Allow highlighting from locked items

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6758
This commit is contained in:
Jon Evans 2020-12-20 11:24:19 -05:00
parent ac793618f9
commit dc1c80beb8
1 changed files with 9 additions and 1 deletions

View File

@ -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 );