Allow user layer names to be used in DRC rules.

I imagine this will also fix the property inspector, once it
gets merged.
This commit is contained in:
Jeff Young 2020-07-20 23:28:54 +01:00
parent 095937563b
commit 1790c536ef
2 changed files with 9 additions and 1 deletions

View File

@ -544,7 +544,7 @@ public:
return m_default;
}
const wxPGChoices& Choices() const
wxPGChoices& Choices()
{
return m_choices;
}

View File

@ -467,6 +467,14 @@ void PCB_EDIT_FRAME::setupTools()
void PCB_EDIT_FRAME::ReFillLayerWidget()
{
ENUM_MAP<PCB_LAYER_ID>& layerEnum = ENUM_MAP<PCB_LAYER_ID>::Instance();
layerEnum.Choices().Clear();
layerEnum.SetDefault( UNDEFINED_LAYER );
for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq )
layerEnum.Map( *seq, GetBoard()->GetLayerName( *seq ) );
wxWindowUpdateLocker no_update( m_Layers );
m_Layers->ReFill();