Only show all layers when the stackup changes.

Fixes: lp:1783231
* https://bugs.launchpad.net/kicad/+bug/1783231
This commit is contained in:
Jeff Young 2018-07-24 18:43:17 +01:00
parent 7fa3491616
commit 994a9c5ff8
1 changed files with 11 additions and 10 deletions

View File

@ -559,9 +559,10 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
} }
} }
wxString name;
m_enabledLayers = getUILayerMask(); m_enabledLayers = getUILayerMask();
if( m_enabledLayers != m_pcb->GetEnabledLayers() )
{
m_pcb->SetEnabledLayers( m_enabledLayers ); m_pcb->SetEnabledLayers( m_enabledLayers );
/* Ensure enabled layers are also visible /* Ensure enabled layers are also visible
@ -569,6 +570,7 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
* layers are not visible when exiting this dialog * layers are not visible when exiting this dialog
*/ */
m_pcb->SetVisibleLayers( m_enabledLayers ); m_pcb->SetVisibleLayers( m_enabledLayers );
}
for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq ) for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq )
{ {
@ -576,8 +578,7 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
if( m_enabledLayers[layer] ) if( m_enabledLayers[layer] )
{ {
name = getLayerName( layer ); m_pcb->SetLayerName( layer, getLayerName( layer ) );
m_pcb->SetLayerName( layer, name );
LAYER_T t = (LAYER_T) getLayerTypeIndex( layer ); LAYER_T t = (LAYER_T) getLayerTypeIndex( layer );
m_pcb->SetLayerType( layer, t ); m_pcb->SetLayerType( layer, t );
} }