diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index a27f960219..7379803bd6 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -1679,6 +1679,16 @@ static struct MODULE_DESC { MODULE_DESC() { + ENUM_MAP& layerEnum = ENUM_MAP::Instance(); + + if( layerEnum.Choices().GetCount() == 0 ) + { + layerEnum.Undefined( UNDEFINED_LAYER ); + + for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq ) + layerEnum.Map( *seq, LSET::Name( *seq ) ); + } + wxPGChoices fpLayers; // footprints might be placed only on F.Cu & B.Cu fpLayers.Add( LSET::Name( F_Cu ), F_Cu ); fpLayers.Add( LSET::Name( B_Cu ), B_Cu ); diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index cb7f640630..f7e87a75f1 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1107,6 +1107,16 @@ static struct TRACK_VIA_DESC .Map( VIATYPE::BLIND_BURIED, _( "Blind/Buried" ) ) .Map( VIATYPE::MICROVIA, _( "Microvia" ) ); + ENUM_MAP& layerEnum = ENUM_MAP::Instance(); + + if( layerEnum.Choices().GetCount() == 0 ) + { + layerEnum.Undefined( UNDEFINED_LAYER ); + + for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq ) + layerEnum.Map( *seq, LSET::Name( *seq ) ); + } + PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance(); // Track