From fd55b7b4edbee35800c7d6128d0a364460c2e976 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 7 Jul 2020 11:46:46 +0200 Subject: [PATCH] 3D viewer: use the full board bounding box to define the visible area. From master, commit eab98eee. --- 3d-viewer/3d_canvas/cinfo3d_visu.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/3d-viewer/3d_canvas/cinfo3d_visu.cpp b/3d-viewer/3d_canvas/cinfo3d_visu.cpp index 2dd8e5545e..5188d9f08e 100644 --- a/3d-viewer/3d_canvas/cinfo3d_visu.cpp +++ b/3d-viewer/3d_canvas/cinfo3d_visu.cpp @@ -272,13 +272,9 @@ void CINFO3D_VISU::InitSettings( REPORTER *aStatusTextReporter ) { wxLogTrace( m_logTrace, wxT( "CINFO3D_VISU::InitSettings" ) ); - // Calculates the board bounding box - // First, use only the board outlines - EDA_RECT bbbox = m_board->ComputeBoundingBox( true ); - - // If no outlines, use the board with items - if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) ) - bbbox = m_board->ComputeBoundingBox( false ); + // Calculates the board bounding box (board outlines + items) + // to ensure any item, even outside the board outlines can be seen + EDA_RECT bbbox = m_board->ComputeBoundingBox( false ); // Gives a non null size to avoid issues in zoom / scale calculations if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )