Fix typo.

And clean up the code just a little to make it clearer.

Fixes https://gitlab.com/kicad/code/kicad/issues/12022
This commit is contained in:
Jeff Young 2022-07-17 17:03:15 +01:00
parent 1278b2916c
commit 1ade5a8c72
1 changed files with 11 additions and 6 deletions

View File

@ -787,14 +787,19 @@ const EDA_RECT FOOTPRINT::GetBoundingBox( bool aIncludeText, bool aIncludeInvisi
for( BOARD_ITEM* item : m_drawings )
{
// We want the bitmap bounding box just in the footprint editor
// so it will start with the correct initial zoom
if( !isFPEdit
&& ( m_privateLayers.test( item->GetLayer() ) || item->Type() != PCB_BITMAP_T ) )
if( m_privateLayers.test( item->GetLayer() ) && !isFPEdit )
continue;
if( item->Type() != PCB_FP_TEXT_T )
area.Merge( item->GetBoundingBox() );
// We want the bitmap bounding box just in the footprint editor
// so it will start with the correct initial zoom
if( item->Type() == PCB_BITMAP_T && !isFPEdit )
continue;
// Handle text separately
if( item->Type() == PCB_FP_TEXT_T )
continue;
area.Merge( item->GetBoundingBox() );
}
for( PAD* pad : m_pads )