Avoid to change the alpha channel color value initially set in GAL mode when modifying a color in legacy mode.
This commit is contained in:
parent
3570154ef0
commit
33e05ae557
|
@ -541,6 +541,15 @@ void PCB_LAYER_WIDGET::ReFill()
|
|||
|
||||
void PCB_LAYER_WIDGET::OnLayerColorChange( int aLayer, COLOR4D aColor )
|
||||
{
|
||||
// Avoid setting the alpha channel, when we are in legacy mode,
|
||||
// because in legacy mode the alpha channel is not used, but changing it
|
||||
// destroys the GAL color setup
|
||||
if( !myframe->IsGalCanvasActive() )
|
||||
{
|
||||
COLOR4D oldColor = myframe->GetBoard()->GetLayerColor( ToLAYER_ID( aLayer ) );
|
||||
aColor.a = oldColor.a;
|
||||
}
|
||||
|
||||
myframe->GetBoard()->SetLayerColor( ToLAYER_ID( aLayer ), aColor );
|
||||
|
||||
if( myframe->IsGalCanvasActive() )
|
||||
|
|
|
@ -365,13 +365,14 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
|
|||
|
||||
// layer colors:
|
||||
wxASSERT( DIM( cds.m_LayersColors ) >= PCB_LAYER_ID_COUNT );
|
||||
|
||||
for( int i = 0; i<PCB_LAYER_ID_COUNT; ++i )
|
||||
{
|
||||
wxString vn = wxString::Format(
|
||||
wxT( "ColorPCBLayer_%s" ),
|
||||
LSET::Name( PCB_LAYER_ID( i ) ) );
|
||||
wxString vn = wxString::Format( "ColorPCBLayer_%s",
|
||||
LSET::Name( PCB_LAYER_ID( i ) ) );
|
||||
|
||||
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, vn, LOC_COLOR( i ), cds.m_LayersColors[i] ) );
|
||||
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, vn, LOC_COLOR( i ),
|
||||
cds.m_LayersColors[i] ) );
|
||||
}
|
||||
|
||||
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorTxtFrontEx" ),
|
||||
|
|
Loading…
Reference in New Issue