Use footprintRect not ViewBBox for determining footprint bounds.
This commit is contained in:
parent
d43eefbad5
commit
d6c3c6f7fa
|
@ -2261,15 +2261,13 @@ int SELECTION_TOOL::hitTestDistance( const wxPoint& aWhere, BOARD_ITEM* aItem,
|
||||||
case PCB_FOOTPRINT_T:
|
case PCB_FOOTPRINT_T:
|
||||||
{
|
{
|
||||||
FOOTPRINT* footprint = static_cast<FOOTPRINT*>( aItem );
|
FOOTPRINT* footprint = static_cast<FOOTPRINT*>( aItem );
|
||||||
|
EDA_RECT bbox = footprint->GetFootprintRect();
|
||||||
|
|
||||||
footprint->GetBoundingHull().Collide( loc, aMaxDistance, &distance );
|
footprint->GetBoundingHull().Collide( loc, aMaxDistance, &distance );
|
||||||
|
|
||||||
// Consider footprints larger than the viewport only as a last resort
|
// Consider footprints larger than the viewport only as a last resort
|
||||||
if( aItem->ViewBBox().GetHeight() > viewport.GetHeight()
|
if( bbox.GetHeight() > viewport.GetHeight() || bbox.GetWidth() > viewport.GetWidth() )
|
||||||
|| aItem->ViewBBox().GetWidth() > viewport.GetWidth() )
|
|
||||||
{
|
|
||||||
distance = INT_MAX / 2;
|
distance = INT_MAX / 2;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue