diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index 1e40ac294c..4c28a2737c 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -1008,9 +1008,18 @@ const BOX2I FOOTPRINT::GetBoundingBox( bool aIncludeText, bool aIncludeInvisible continue; } - // Treat dimension objects as text - if( !aIncludeText && BaseType( item->Type() ) == PCB_DIMENSION_T ) - continue; + // If we're not including text then drop annotations as well + if( !aIncludeText ) + { + if( BaseType( item->Type() ) == PCB_DIMENSION_T ) + continue; + + if( item->GetLayer() == Cmts_User || item->GetLayer() == Dwgs_User + || item->GetLayer() == Eco1_User || item->GetLayer() == Eco2_User ) + { + continue; + } + } bbox.Merge( item->GetBoundingBox() ); } diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index da242d5c36..11c6def294 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -699,7 +699,7 @@ const BOX2I FOOTPRINT_EDIT_FRAME::GetDocumentExtents( bool aIncludeAllVisible ) { for( const BOARD_ITEM* item : footprint->GraphicalItems() ) { - if( item->Type() == PCB_TEXT_T ) + if( item->Type() == PCB_TEXT_T || item->Type() == PCB_TEXTBOX_T ) continue; hasGraphicalItem = true;