From 6482a322da99d967f75d01d7af9d984be3bdd6a6 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 6 May 2024 10:36:20 -0700 Subject: [PATCH] Optionally use electrical type when shown. We also need to consider electrical type as an exact hit when we are showing it. Otherwise, we get the pin added to our consideration list but not selected without hitting close neighbors Fixes https://gitlab.com/kicad/code/kicad/-/issues/16183 (cherry picked from commit 3620887a22a50f26cc5d24a0acef9f77023910c9) --- eeschema/tools/ee_selection_tool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index df7842affb..5fb8cce7e2 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -1426,8 +1426,14 @@ void EE_SELECTION_TOOL::GuessSelectionCandidates( EE_COLLECTOR& collector, const } else { + + if( m_frame->GetRenderSettings()->m_ShowPinsElectricalType ) + item->SetFlags( SHOW_ELEC_TYPE ); + if( item->HitTest( aPos, 0 ) ) exactHits.insert( item ); + + item->ClearFlags( SHOW_ELEC_TYPE ); } }