Take width into viewBBox account

Don't let objects disappear until their full extend has been removed
from view.

Fixes https://gitlab.com/kicad/code/kicad/issues/7318
This commit is contained in:
Seth Hillbrand 2021-01-28 14:19:31 -08:00
parent 540dd11b58
commit 1733a23ac7
1 changed files with 8 additions and 2 deletions

View File

@ -958,10 +958,16 @@ const BOX2I PCB_SHAPE::ViewBBox() const
EDA_RECT bbox; EDA_RECT bbox;
bbox.SetOrigin( m_end ); bbox.SetOrigin( m_end );
computeArcBBox( bbox ); computeArcBBox( bbox );
return BOX2I( bbox.GetOrigin(), bbox.GetSize() ); BOX2I return_box( bbox.GetOrigin(), bbox.GetSize() );
return_box.Inflate( 2 * m_width );
return return_box;
} }
return EDA_ITEM::ViewBBox(); BOX2I return_box = EDA_ITEM::ViewBBox();
return_box.Inflate( 2 * m_width );
return return_box;
} }