pcbenw: Clear contours before regenerating in DRC

When checking for closed outlines, we generate a board area using the
pcb structure.  We now also check for overlapping outlines due to
lp:1818163 However, the DRC maintained its previous outline before
generating the new one, causing an overlap error.

This regenerates the board outline from zero for each DRC run.

Fixes: lp:1819012
* https://bugs.launchpad.net/kicad/+bug/1819012
This commit is contained in:
Seth Hillbrand 2019-03-07 09:41:44 -08:00
parent 5ba2a08366
commit 523b37d9ae
1 changed files with 2 additions and 0 deletions

View File

@ -1212,6 +1212,8 @@ void DRC::testOutline()
{
wxPoint error_loc( m_pcb->GetBoardEdgesBoundingBox().GetPosition() );
m_board_outlines.RemoveAllContours();
if( !m_pcb->GetBoardPolygonOutlines( m_board_outlines, nullptr, &error_loc ) )
{
addMarkerToPcb( m_markerFactory.NewMarker( error_loc, m_pcb, DRCE_INVALID_OUTLINE ) );