Don't include hidden layers when selecting tuning

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16188
This commit is contained in:
Seth Hillbrand 2023-11-28 09:40:44 -08:00
parent 35ee0b12d1
commit 619c9bb0e4
1 changed files with 6 additions and 0 deletions

View File

@ -1789,6 +1789,12 @@ int DRAWING_TOOL::PlaceTuningPattern( const TOOL_EVENT& aEvent )
GENERAL_COLLECTOR collector;
collector.m_Threshold = KiROUND( getView()->ToWorld( HITTEST_THRESHOLD_PIXELS ) );
if( m_frame->GetDisplayOptions().m_ContrastModeDisplay != HIGH_CONTRAST_MODE::NORMAL )
guide.SetIncludeSecondary( false );
else
guide.SetIncludeSecondary( true );
collector.Collect( board, { PCB_TRACE_T, PCB_ARC_T }, cursorPos, guide );
if( collector.GetCount() > 1 )