Only update the layer icon bitmap when it has actually changed
This was causing unnecessary calls to refresh the toolbar, causing flickering in the layer widget. Fixes https://gitlab.com/kicad/code/kicad/-/issues/5212
This commit is contained in:
parent
5b365053db
commit
cff76e55d5
|
@ -200,13 +200,13 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator( bool aForceRebuild )
|
|||
wxIMAGE_QUALITY_NEAREST );
|
||||
|
||||
LayerPairBitmap = std::make_unique<wxBitmap>( image );
|
||||
}
|
||||
|
||||
if( m_mainToolBar )
|
||||
{
|
||||
m_mainToolBar->SetToolBitmap( PCB_ACTIONS::selectLayerPair, *LayerPairBitmap );
|
||||
m_mainToolBar->Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -662,5 +662,6 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent )
|
|||
|
||||
void PCB_EDIT_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
if( m_SelLayerBox->GetLayerSelection() != GetActiveLayer() )
|
||||
m_SelLayerBox->SetLayerSelection( GetActiveLayer() );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue