Browse Source

Fix typo.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/12022
7.0
Jeff Young 3 years ago
parent
commit
1ade5a8c72
  1. 13
      pcbnew/footprint.cpp

13
pcbnew/footprint.cpp

@ -787,14 +787,19 @@ const EDA_RECT FOOTPRINT::GetBoundingBox( bool aIncludeText, bool aIncludeInvisi
for( BOARD_ITEM* item : m_drawings )
{
if( m_privateLayers.test( item->GetLayer() ) && !isFPEdit )
continue;
// 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( item->Type() == PCB_BITMAP_T && !isFPEdit )
continue;
// Handle text separately
if( item->Type() == PCB_FP_TEXT_T )
continue;
if( item->Type() != PCB_FP_TEXT_T )
area.Merge( item->GetBoundingBox() );
area.Merge( item->GetBoundingBox() );
}
for( PAD* pad : m_pads )

Loading…
Cancel
Save