Gerbview: Add support for recent File Format Attribute metadata, both for X2 Gerber file format and X1 (R274X) format.

Pcbnew already uses this attribute when creating Gerber files.
Because Gerber files using this attribute identify the board layers stackup, Gerbview (if this attribute is defined) can sort gerber images stach up like the board.
(in layer manager, just right click to access to the sort menu)
This commit is contained in:
jean-pierre charras
2014-11-22 12:52:57 +01:00
parent 0c1a87ca56
commit 555ce68efe
27 changed files with 820 additions and 78 deletions
@@ -37,6 +37,7 @@
#include <gerbview.h>
#include <gerbview_frame.h>
#include <class_GERBER.h>
#include <pcbplot.h>
static double s_ScaleList[] =
@@ -163,7 +164,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( )
msg << wxT( " " ) << ii + 1;
m_BoxSelectLayer[ii] = new wxCheckBox( this, -1, msg );
if( g_GERBER_List[ii] == NULL ) // Nothing loaded on this draw layer
if( g_GERBER_List.GetGbrImage( ii ) == NULL ) // Nothing loaded on this draw layer
m_BoxSelectLayer[ii]->Enable( false );
if( ii < 16 )