From 553166f932028aa0306eabd46b810da753b068b9 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 29 Jan 2021 09:06:42 -0800 Subject: [PATCH] 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 --- pcbnew/track.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pcbnew/track.cpp b/pcbnew/track.cpp index 731cb348ad..f5bc611d12 100644 --- a/pcbnew/track.cpp +++ b/pcbnew/track.cpp @@ -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 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 );