Don't check edge cuts visibility when getting board bbox from edges.
Fixes https://gitlab.com/kicad/code/kicad/issues/6805
This commit is contained in:
parent
b255feb94f
commit
5d4042d6b0
|
@ -111,19 +111,19 @@ public:
|
|||
|
||||
const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override
|
||||
{
|
||||
/* "Zoom to Fit" calls this with "aIncludeAllVisible" as true. Since that
|
||||
* feature always ignored the page and border, this function returns a bbox
|
||||
* without them as well when passed true. This technically is not all things
|
||||
* visible, but it keeps behavior consistent.
|
||||
/* "Zoom to Fit" calls this with "aIncludeAllVisible" as true. Since that feature
|
||||
* always ignored the page and border, this function returns a bbox without them
|
||||
* as well when passed true. This technically is not all things visible, but it
|
||||
* keeps behavior consistent.
|
||||
*
|
||||
* When passed false, this function returns a bbox of just the board edge.
|
||||
* This allows things like fabrication text or anything else outside the board
|
||||
* edge to be ignored, and just zooms up to the board itself.
|
||||
* When passed false, this function returns a bbox of just the board edge. This
|
||||
* allows things like fabrication text or anything else outside the board edge to
|
||||
* be ignored, and just zooms up to the board itself.
|
||||
*
|
||||
* Calling "GetBoardBoundingBox(true)" when edge cuts are turned off will return bbox of
|
||||
* entire page and border, so we make sure to do "GetBoardBoundingBox(false)" instead.
|
||||
* Calling "GetBoardBoundingBox(true)" when edge cuts are turned off will return
|
||||
* the entire page and border, so we call "GetBoardBoundingBox(false)" instead.
|
||||
*/
|
||||
if( aIncludeAllVisible || ( !aIncludeAllVisible && !m_pcb->IsLayerVisible( Edge_Cuts ) ) )
|
||||
if( aIncludeAllVisible || !m_pcb->IsLayerVisible( Edge_Cuts ) )
|
||||
return GetBoardBoundingBox( false );
|
||||
else
|
||||
return GetBoardBoundingBox( true );
|
||||
|
|
|
@ -1016,6 +1016,9 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const
|
|||
bool showInvisibleText = IsElementVisible( LAYER_MOD_TEXT_INVISIBLE )
|
||||
&& PgmOrNull() && !PgmOrNull()->m_Printing;
|
||||
|
||||
if( aBoardEdgesOnly )
|
||||
visible.set( Edge_Cuts );
|
||||
|
||||
// Check shapes, dimensions, texts, and fiducials
|
||||
for( BOARD_ITEM* item : m_drawings )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue