diff --git a/gerbview/gerber_draw_item.cpp b/gerbview/gerber_draw_item.cpp index d97502f986..1d1cf98774 100644 --- a/gerbview/gerber_draw_item.cpp +++ b/gerbview/gerber_draw_item.cpp @@ -387,6 +387,9 @@ const EDA_RECT GERBER_DRAW_ITEM::GetBoundingBox() const { if( code && code->m_Shape == APT_RECT ) { + if( m_Polygon.OutlineCount() == 0 ) + ConvertSegmentToPolygon(); + if( m_Polygon.OutlineCount() > 0 ) { auto bb = m_Polygon.BBox();