From b3f53ac86223b002a1d207ad26e344a9a2caaee9 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Thu, 20 Jun 2024 23:16:41 +0100 Subject: [PATCH] Always include footprint edgecuts in board edge bounding box The footprint edgecuts should always be part of the board edge bounding box, even if the layer the footprint is on is hidden from view. Fixes https://gitlab.com/kicad/code/kicad/-/issues/18245 (Cherry-picked from 672d2c6af8169b8bb84158a3a9f1ab9328d9ba13) --- pcbnew/board.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index 555d8d50e5..dae9ae74d8 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -1404,9 +1404,6 @@ BOX2I BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const // Check footprints for( FOOTPRINT* footprint : m_footprints ) { - if( !( footprint->GetLayerSet() & visible ).any() ) - continue; - if( aBoardEdgesOnly ) { for( const BOARD_ITEM* edge : footprint->GraphicalItems() ) @@ -1415,7 +1412,7 @@ BOX2I BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const bbox.Merge( edge->GetBoundingBox() ); } } - else + else if( ( footprint->GetLayerSet() & visible ).any() ) { bbox.Merge( footprint->GetBoundingBox( true, showHiddenText ) ); }