Fix same parsing issue in PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/issues/4416
This commit is contained in:
parent
ed57c3464d
commit
a632e5fbdb
|
@ -177,6 +177,7 @@ pad_prop_testpoint
|
|||
pad_prop_heatsink
|
||||
property
|
||||
page
|
||||
paper
|
||||
path
|
||||
pcb_text_size
|
||||
pcb_text_width
|
||||
|
|
|
@ -65,8 +65,9 @@ class TEXTE_PCB;
|
|||
//#define SEXPR_BOARD_FILE_VERSION 20190905 // Add board physical stackup info in setup section
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20190907 // Keepout areas in footprints
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20191123 // pin function in pads
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20200104 // pad property for fabrication
|
||||
#define SEXPR_BOARD_FILE_VERSION 20200119 // arcs in tracks
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20200104 // pad property for fabrication
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20200119 // arcs in tracks
|
||||
#define SEXPR_BOARD_FILE_VERSION 20200512 // page -> paper
|
||||
|
||||
#define CTL_STD_LAYER_NAMES (1 << 0) ///< Use English Standard layer names
|
||||
#define CTL_OMIT_NETS (1 << 1) ///< Omit pads net names (useless in library)
|
||||
|
|
|
@ -546,13 +546,16 @@ BOARD* PCB_PARSER::parseBOARD_unchecked()
|
|||
|
||||
token = NextTok();
|
||||
|
||||
if( token == T_page && m_requiredVersion <= 20200119 )
|
||||
token = T_paper;
|
||||
|
||||
switch( token )
|
||||
{
|
||||
case T_general:
|
||||
parseGeneralSection();
|
||||
break;
|
||||
|
||||
case T_page:
|
||||
case T_paper:
|
||||
parsePAGE_INFO();
|
||||
break;
|
||||
|
||||
|
@ -790,7 +793,7 @@ void PCB_PARSER::parseGeneralSection()
|
|||
|
||||
void PCB_PARSER::parsePAGE_INFO()
|
||||
{
|
||||
wxCHECK_RET( CurTok() == T_page,
|
||||
wxCHECK_RET( ( CurTok() == T_page && m_requiredVersion <= 20200119 ) || CurTok() == T_paper,
|
||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a PAGE_INFO." ) );
|
||||
|
||||
T token;
|
||||
|
|
Loading…
Reference in New Issue