diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp index 7a501c4f65..a271566a90 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp @@ -59,6 +59,8 @@ PRIVATE_LAYERS_GRID_TABLE::PRIVATE_LAYERS_GRID_TABLE( PCB_BASE_FRAME* aFrame ) : m_layerColAttr->SetRenderer( new GRID_CELL_LAYER_RENDERER( m_frame ) ); LSET forbiddenLayers = LSET::AllCuMask() | LSET::AllTechMask(); + forbiddenLayers.set( Edge_Cuts ); + forbiddenLayers.set( Margin ); m_layerColAttr->SetEditor( new GRID_CELL_LAYER_SELECTOR( m_frame, forbiddenLayers ) ); } diff --git a/pcbnew/plugins/kicad/pcb_parser.cpp b/pcbnew/plugins/kicad/pcb_parser.cpp index 269733ee2f..fed461ee37 100644 --- a/pcbnew/plugins/kicad/pcb_parser.cpp +++ b/pcbnew/plugins/kicad/pcb_parser.cpp @@ -3636,6 +3636,12 @@ FOOTPRINT* PCB_PARSER::parseFOOTPRINT_unchecked( wxArrayString* aInitialComments Expecting( "layer name" ); } + if( m_requiredVersion < 20220427 ) + { + privateLayers.set( Edge_Cuts, false ); + privateLayers.set( Margin, false ); + } + footprint->SetPrivateLayers( privateLayers ); break; } diff --git a/pcbnew/plugins/kicad/pcb_plugin.h b/pcbnew/plugins/kicad/pcb_plugin.h index e7ec8d5f78..0a0a0439a3 100644 --- a/pcbnew/plugins/kicad/pcb_plugin.h +++ b/pcbnew/plugins/kicad/pcb_plugin.h @@ -120,7 +120,8 @@ class SHAPE_LINE_CHAIN; //#define SEXPR_BOARD_FILE_VERSION 20220225 // Remove TEDIT //#define SEXPR_BOARD_FILE_VERSION 20220308 // Knockout text and Locked graphic text property saved //#define SEXPR_BOARD_FILE_VERSION 20220331 // Plot on all layers selection setting -#define SEXPR_BOARD_FILE_VERSION 20220417 // Automatic dimension precisions +//#define SEXPR_BOARD_FILE_VERSION 20220417 // Automatic dimension precisions +#define SEXPR_BOARD_FILE_VERSION 20220427 // Exclude Edge.Cuts & Margin from fp private layers #define BOARD_FILE_HOST_VERSION 20200825 ///< Earlier files than this include the host tag #define LEGACY_ARC_FORMATTING 20210925 ///< These were the last to use old arc formatting