From f48e868a796bd8dcb82fbee68fe6cc9bcb80bbbf Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 15 Nov 2017 20:30:32 +1100 Subject: [PATCH] Load "disabled" for footprint libraries --- common/fp_lib_table.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index 99a2afc358..8eff009ef1 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -109,10 +109,11 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in ) // After (name), remaining (lib) elements are order independent, and in // some cases optional. - bool sawType = false; - bool sawOpts = false; - bool sawDesc = false; - bool sawUri = false; + bool sawType = false; + bool sawOpts = false; + bool sawDesc = false; + bool sawUri = false; + bool sawDisabled = false; while( ( tok = in->NextTok() ) != T_RIGHT ) { @@ -158,6 +159,13 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in ) row->SetDescr( in->FromUTF8() ); break; + case T_disabled: + if( sawDisabled ) + in->Duplicate( tok ); + sawDisabled = true; + row->SetEnabled( false ); + break; + default: in->Unexpected( tok ); }