Refresh zone layers when copper layers change opacity.

Fixes https://gitlab.com/kicad/code/kicad/issues/7468
This commit is contained in:
Jeff Young 2021-02-09 12:26:08 +00:00
parent 618e824b0f
commit a49a6c2f52
2 changed files with 9 additions and 1 deletions

View File

@ -356,6 +356,10 @@ int PCB_CONTROL::LayerAlphaInc( const TOOL_EVENT& aEvent )
KIGFX::VIEW* view = m_frame->GetCanvas()->GetView();
view->UpdateLayerColor( currentLayer );
view->UpdateLayerColor( GetNetnameLayer( currentLayer ) );
if( IsCopperLayer( currentLayer ) )
view->UpdateLayerColor( ZONE_LAYER_FOR( currentLayer ) );
wxUpdateUIEvent dummy;
static_cast<PCB_EDIT_FRAME*>( m_frame )->OnUpdateLayerAlpha( dummy );
@ -382,6 +386,10 @@ int PCB_CONTROL::LayerAlphaDec( const TOOL_EVENT& aEvent )
KIGFX::VIEW* view = m_frame->GetCanvas()->GetView();
view->UpdateLayerColor( currentLayer );
view->UpdateLayerColor( GetNetnameLayer( currentLayer ) );
if( IsCopperLayer( currentLayer ) )
view->UpdateLayerColor( ZONE_LAYER_FOR( currentLayer ) );
wxUpdateUIEvent dummy;
static_cast<PCB_BASE_FRAME*>( m_frame )->OnUpdateLayerAlpha( dummy );

View File

@ -2412,7 +2412,7 @@ void APPEARANCE_CONTROLS::OnColorSwatchChanged( wxCommandEvent& aEvent )
view->UpdateLayerColor( layer );
view->UpdateLayerColor( GetNetnameLayer( layer ) );
if( layer < PCB_LAYER_ID_COUNT )
if( IsCopperLayer( layer ) )
view->UpdateLayerColor( ZONE_LAYER_FOR( layer ) );
// Update the bitmap of the layer box