From 9b74bb5c9289b3ed97c016ac1ad4bea35c68ec63 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 3 Feb 2020 15:44:41 +0000 Subject: [PATCH] Remove preferred layer disambiguation for multiple modules. The preferred list isn't actually in use anymore at this point, so it currently has no effect other than to mess things up since we aren't keeping track of which modules have been rejected when we check the module count. Fixes https://gitlab.com/kicad/code/kicad/issues/3721 (cherry picked from commit d02c0da3ab1c798a155d6e64041100458ab5560c) --- pcbnew/tools/selection_tool.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index e82d1c2a3b..d03fce8f69 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -2057,10 +2057,8 @@ void SELECTION_TOOL::guessSelectionCandidates( GENERAL_COLLECTOR& aCollector, } } - int numZones = aCollector.CountType( PCB_ZONE_AREA_T ); - // Zone edges are very specific; zone fills much less so. - if( numZones > 0 ) + if( aCollector.CountType( PCB_ZONE_AREA_T ) > 0 ) { for( int i = aCollector.GetCount() - 1; i >= 0; i-- ) { @@ -2148,9 +2146,7 @@ void SELECTION_TOOL::guessSelectionCandidates( GENERAL_COLLECTOR& aCollector, } } - int moduleCount = aCollector.CountType( PCB_MODULE_T ); - - if( moduleCount > 0 ) + if( aCollector.CountType( PCB_MODULE_T ) > 0 ) { double maxArea = calcMaxArea( aCollector, PCB_MODULE_T ); BOX2D viewportD = getView()->GetViewport();