mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Use footprintRect not ViewBBox for determining footprint bounds.
This commit is contained in:
parent
d43eefbad5
commit
d6c3c6f7fa
@ -2261,16 +2261,14 @@ int SELECTION_TOOL::hitTestDistance( const wxPoint& aWhere, BOARD_ITEM* aItem,
|
||||
case PCB_FOOTPRINT_T:
|
||||
{
|
||||
FOOTPRINT* footprint = static_cast<FOOTPRINT*>( aItem );
|
||||
EDA_RECT bbox = footprint->GetFootprintRect();
|
||||
|
||||
footprint->GetBoundingHull().Collide( loc, aMaxDistance, &distance );
|
||||
|
||||
// Consider footprints larger than the viewport only as a last resort
|
||||
if( aItem->ViewBBox().GetHeight() > viewport.GetHeight()
|
||||
|| aItem->ViewBBox().GetWidth() > viewport.GetWidth() )
|
||||
{
|
||||
if( bbox.GetHeight() > viewport.GetHeight() || bbox.GetWidth() > viewport.GetWidth() )
|
||||
distance = INT_MAX / 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PCB_MARKER_T:
|
||||
|
Loading…
x
Reference in New Issue
Block a user