Don't include text in footprint preview widget's autozoom.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16794
This commit is contained in:
Jeff Young 2024-01-28 14:34:10 +00:00
parent 92308698ba
commit 071d8af5d7
2 changed files with 2 additions and 2 deletions

View File

@ -1461,7 +1461,7 @@ bool FOOTPRINT::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) co
if( !aRect.Intersects( GetBoundingBox( false, false ) ) )
return false;
// The empty footprint dummy rectangle intersects the selection area.
// If there are no pads, zones, or drawings, allow intersection with text
if( m_pads.empty() && m_zones.empty() && m_drawings.empty() )
return GetBoundingBox( true, false ).Intersects( arect );

View File

@ -139,7 +139,7 @@ void FOOTPRINT_PREVIEW_PANEL::renderFootprint( std::shared_ptr<FOOTPRINT> aFootp
void FOOTPRINT_PREVIEW_PANEL::fitToCurrentFootprint()
{
BOX2I bbox = m_currentFootprint->GetBoundingBox( true, false );
BOX2I bbox = m_currentFootprint->GetBoundingBox( false, false );
if( bbox.GetSize().x > 0 && bbox.GetSize().y > 0 )
{