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
This commit is contained in:
parent
1bb507e3c4
commit
672d2c6af8
|
@ -1578,9 +1578,6 @@ BOX2I BOARD::ComputeBoundingBox( bool aBoardEdgesOnly, bool aIncludeHiddenText )
|
||||||
// Check footprints
|
// Check footprints
|
||||||
for( FOOTPRINT* footprint : m_footprints )
|
for( FOOTPRINT* footprint : m_footprints )
|
||||||
{
|
{
|
||||||
if( !( footprint->GetLayerSet() & visible ).any() )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if( aBoardEdgesOnly )
|
if( aBoardEdgesOnly )
|
||||||
{
|
{
|
||||||
for( const BOARD_ITEM* edge : footprint->GraphicalItems() )
|
for( const BOARD_ITEM* edge : footprint->GraphicalItems() )
|
||||||
|
@ -1589,7 +1586,7 @@ BOX2I BOARD::ComputeBoundingBox( bool aBoardEdgesOnly, bool aIncludeHiddenText )
|
||||||
bbox.Merge( edge->GetBoundingBox() );
|
bbox.Merge( edge->GetBoundingBox() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if( ( footprint->GetLayerSet() & visible ).any() )
|
||||||
{
|
{
|
||||||
bbox.Merge( footprint->GetBoundingBox( true, aIncludeHiddenText ) );
|
bbox.Merge( footprint->GetBoundingBox( true, aIncludeHiddenText ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue