Properly exclude colorless GAL layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4793
This commit is contained in:
parent
a02a4ff179
commit
2f4a14a57b
|
@ -60,13 +60,11 @@ PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS( PCB_EDIT_FRAME* aFrame
|
|||
mgr.ReloadColorSettings();
|
||||
createThemeList( app_settings->m_ColorTheme );
|
||||
|
||||
for( int id = F_Cu; id < PCB_LAYER_ID_COUNT; id++ )
|
||||
m_validLayers.push_back( id );
|
||||
|
||||
for( int id = GAL_LAYER_ID_START; id < GAL_LAYER_ID_END; id++ )
|
||||
for( int id = GAL_LAYER_ID_START; id < GAL_LAYER_ID_BITMASK_END; id++ )
|
||||
{
|
||||
if( id == LAYER_VIAS || id == LAYER_GRID_AXES || id == LAYER_PADS_PLATEDHOLES
|
||||
|| id == LAYER_VIAS_HOLES )
|
||||
|| id == LAYER_VIAS_HOLES || id == LAYER_DRAW_BITMAPS
|
||||
|| id == LAYER_GP_OVERLAY )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -74,6 +72,8 @@ PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS( PCB_EDIT_FRAME* aFrame
|
|||
m_validLayers.push_back( id );
|
||||
}
|
||||
|
||||
// NOTE: Main board layers are added by createSwatches()
|
||||
|
||||
m_backgroundLayer = LAYER_PCB_BACKGROUND;
|
||||
|
||||
m_colorsMainSizer->Insert( 0, 10, 0, 0, wxEXPAND, 5 );
|
||||
|
@ -116,13 +116,7 @@ bool PANEL_PCBNEW_COLOR_SETTINGS::TransferDataToWindow()
|
|||
|
||||
void PANEL_PCBNEW_COLOR_SETTINGS::createSwatches()
|
||||
{
|
||||
std::vector<int> layers;
|
||||
|
||||
for( GAL_LAYER_ID i = GAL_LAYER_ID_START; i < GAL_LAYER_ID_END; ++i )
|
||||
{
|
||||
if( m_currentSettings->GetColor( i ) != COLOR4D::UNSPECIFIED )
|
||||
layers.push_back( i );
|
||||
}
|
||||
std::vector<int> layers( m_validLayers );
|
||||
|
||||
std::sort( layers.begin(), layers.end(),
|
||||
[]( int a, int b )
|
||||
|
|
Loading…
Reference in New Issue