Update the layer names in cli/python board load of the property grid layer enum because DRC quietly uses it
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16555
This commit is contained in:
parent
60cba81a2e
commit
08c2237a94
|
@ -179,6 +179,21 @@ BOARD* LoadBoard( wxString& aFileName, PCB_IO_MGR::PCB_FILE_T aFormat )
|
|||
|
||||
if( brd )
|
||||
{
|
||||
// JEY TODO: move this global to the board
|
||||
ENUM_MAP<PCB_LAYER_ID>& layerEnum = ENUM_MAP<PCB_LAYER_ID>::Instance();
|
||||
|
||||
layerEnum.Choices().Clear();
|
||||
layerEnum.Undefined( UNDEFINED_LAYER );
|
||||
|
||||
for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
|
||||
{
|
||||
// Canonical name
|
||||
layerEnum.Map( *seq, LSET::Name( *seq ) );
|
||||
|
||||
// User name
|
||||
layerEnum.Map( *seq, brd->GetLayerName( *seq ) );
|
||||
}
|
||||
|
||||
brd->SetProject( project );
|
||||
|
||||
// Move legacy view settings to local project settings
|
||||
|
|
Loading…
Reference in New Issue