Gen drill map file: ensure plot works when the edge cut layer is not visible

Fixes #5912
https://gitlab.com/kicad/code/kicad/issues/5912
This commit is contained in:
jean-pierre charras 2020-10-09 17:33:43 +02:00
parent f60954c232
commit dd929c7b2e
1 changed files with 5 additions and 1 deletions

View File

@ -79,8 +79,12 @@ bool GENDRILL_WRITER_BASE::genDrillMapFile( const wxString& aFullFileName, PLOT_
const PAGE_INFO& page_info = m_pageInfo ? *m_pageInfo : dummy;
// Calculate dimensions and center of PCB
// Calculate dimensions and center of PCB. The Edge_Cuts layer must be visible
// to calculate the board edges bounding box
LSET visibleLayers = m_pcb->GetVisibleLayers();
m_pcb->SetVisibleLayers( visibleLayers | LSET( Edge_Cuts ) );
EDA_RECT bbbox = m_pcb->GetBoardEdgesBoundingBox();
m_pcb->SetVisibleLayers( visibleLayers );
// Calculate the scale for the format type, scale 1 in HPGL, drawing on
// an A4 sheet in PS, + text description of symbols