3D viewer: use the full board bounding box to define the visible area.
Remove also a printf now useless, used for debug. Fixes #4815 https://gitlab.com/kicad/code/kicad/issues/4815
This commit is contained in:
parent
b084305b12
commit
eab98eee1d
|
@ -277,13 +277,9 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, wxT( "BOARD_ADAPTER::InitSettings" ) );
|
wxLogTrace( m_logTrace, wxT( "BOARD_ADAPTER::InitSettings" ) );
|
||||||
|
|
||||||
// Calculates the board bounding box
|
// Calculates the board bounding box (board outlines + items)
|
||||||
// First, use only the board outlines
|
// to ensure any item, even outside the board outlines can be seen
|
||||||
EDA_RECT bbbox = m_board->ComputeBoundingBox( true );
|
EDA_RECT bbbox = m_board->ComputeBoundingBox( false );
|
||||||
|
|
||||||
// If no outlines, use the board with items
|
|
||||||
if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
|
|
||||||
bbbox = m_board->ComputeBoundingBox( false );
|
|
||||||
|
|
||||||
// Gives a non null size to avoid issues in zoom / scale calculations
|
// Gives a non null size to avoid issues in zoom / scale calculations
|
||||||
if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
|
if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
|
||||||
|
|
|
@ -330,7 +330,7 @@ void D_PAD::BuildEffectiveShapes() const
|
||||||
for( const std::shared_ptr<DRAWSEGMENT>& primitive : m_editPrimitives )
|
for( const std::shared_ptr<DRAWSEGMENT>& primitive : m_editPrimitives )
|
||||||
{
|
{
|
||||||
for( SHAPE* shape : primitive->MakeEffectiveShapes() )
|
for( SHAPE* shape : primitive->MakeEffectiveShapes() )
|
||||||
{printf("shape %d\n", shape->Type());fflush(0);
|
{
|
||||||
shape->Rotate( -DECIDEG2RAD( m_Orient ) );
|
shape->Rotate( -DECIDEG2RAD( m_Orient ) );
|
||||||
shape->Move( shapePos );
|
shape->Move( shapePos );
|
||||||
add( shape );
|
add( shape );
|
||||||
|
|
Loading…
Reference in New Issue