Don't try to update non-existent zone layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6803
This commit is contained in:
parent
9b43177e74
commit
db0df1fdc9
|
@ -2390,7 +2390,9 @@ void APPEARANCE_CONTROLS::OnColorSwatchChanged( wxCommandEvent& aEvent )
|
||||||
KIGFX::VIEW* view = m_frame->GetCanvas()->GetView();
|
KIGFX::VIEW* view = m_frame->GetCanvas()->GetView();
|
||||||
view->UpdateLayerColor( layer );
|
view->UpdateLayerColor( layer );
|
||||||
view->UpdateLayerColor( GetNetnameLayer( layer ) );
|
view->UpdateLayerColor( GetNetnameLayer( layer ) );
|
||||||
view->UpdateLayerColor( ZONE_LAYER_FOR( layer ) );
|
|
||||||
|
if( layer < PCB_LAYER_ID_COUNT )
|
||||||
|
view->UpdateLayerColor( ZONE_LAYER_FOR( layer ) );
|
||||||
|
|
||||||
// Update the bitmap of the layer box
|
// Update the bitmap of the layer box
|
||||||
if( m_frame->IsType( FRAME_PCB_EDITOR ) )
|
if( m_frame->IsType( FRAME_PCB_EDITOR ) )
|
||||||
|
|
Loading…
Reference in New Issue