From 722edda83ce7429b30e1706543e77d373faac2ee Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sat, 4 May 2019 22:59:56 -0400 Subject: [PATCH] Make it easier to select footprints that overlap pads on opposite side --- pcbnew/tools/selection_tool.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 83bca33bb1..0d62187f34 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -2170,6 +2170,10 @@ void SELECTION_TOOL::guessSelectionCandidates( GENERAL_COLLECTOR& aCollector, // footprint then it should be considered for selection else if( calcRatio( calcArea( mod ), maxArea ) <= footprintToFootprintMinRatio ) continue; + // if there are multiple footprints for selection at this point, prefer + // one that is on the active layer + else if( moduleCount > 1 && mod->GetLayer() == activeLayer ) + preferred.insert( mod ); // reject ALL OTHER footprints if there's still something else left // to select else if( (int)( rejected.size() + 1 ) < aCollector.GetCount() )