Handle ARC bbox in tracks

Need to handle arcs separately to ensure we get the full bounding box

Fixes https://gitlab.com/kicad/code/kicad/issues/7318
This commit is contained in:
Seth Hillbrand 2021-01-29 09:06:42 -08:00
parent 02954dfaa1
commit 553166f932
1 changed files with 10 additions and 0 deletions

View File

@ -229,6 +229,16 @@ const EDA_RECT TRACK::GetBoundingBox() const
ymin = m_Start.y;
xmin = m_Start.x;
}
else if( Type() == PCB_ARC_T )
{
std::shared_ptr<SHAPE> arc = GetEffectiveShape();
auto bbox = arc->BBox();
xmin = bbox.GetLeft();
xmax = bbox.GetRight();
ymin = bbox.GetTop();
ymax = bbox.GetBottom();
}
else
{
ymax = std::max( m_Start.y, m_End.y );