Selection: skip sloppiness pruning if invalid

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7320
This commit is contained in:
Jon Evans 2021-01-28 19:51:29 -05:00
parent 74a5db64c2
commit b5e9a949bc
1 changed files with 6 additions and 3 deletions

View File

@ -2374,11 +2374,14 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector
// Prune sloppier items
if( minSlop < INT_MAX )
{
for( std::pair<BOARD_ITEM*, int> pair : itemsBySloppiness )
{
if( pair.second > minSlop + pixel )
aCollector.Transfer( pair.first );
}
}
// If the user clicked on a small item within a much larger one then it's pretty clear
// they're trying to select the smaller one.