footprint.cpp::GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ):

Do not include invisible fields when aIncludeInvisibleText is false.
This commit is contained in:
jean-pierre charras 2023-07-22 11:48:17 +02:00
parent 878a67ca65
commit 8425e5a0b7
1 changed files with 2 additions and 1 deletions

View File

@ -1036,7 +1036,8 @@ const BOX2I FOOTPRINT::GetBoundingBox( bool aIncludeText, bool aIncludeInvisible
if( !isFPEdit && m_privateLayers.test( text->GetLayer() ) )
continue;
bbox.Merge( text->GetBoundingBox() );
if( aIncludeInvisibleText || text->IsVisible() )
bbox.Merge( text->GetBoundingBox() );
}
// This can be further optimized when aIncludeInvisibleText is true, but currently