Selection: skip sloppiness pruning if invalid
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7320
This commit is contained in:
parent
74a5db64c2
commit
b5e9a949bc
|
@ -2374,11 +2374,14 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector
|
||||||
|
|
||||||
// Prune sloppier items
|
// Prune sloppier items
|
||||||
|
|
||||||
|
if( minSlop < INT_MAX )
|
||||||
|
{
|
||||||
for( std::pair<BOARD_ITEM*, int> pair : itemsBySloppiness )
|
for( std::pair<BOARD_ITEM*, int> pair : itemsBySloppiness )
|
||||||
{
|
{
|
||||||
if( pair.second > minSlop + pixel )
|
if( pair.second > minSlop + pixel )
|
||||||
aCollector.Transfer( pair.first );
|
aCollector.Transfer( pair.first );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the user clicked on a small item within a much larger one then it's pretty clear
|
// 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.
|
// they're trying to select the smaller one.
|
||||||
|
|
Loading…
Reference in New Issue