pcbnew: Fix flicker in layer widget when toggling grid

This commit is contained in:
Ian McInerney 2019-11-24 00:51:54 +00:00
parent 7339eb31eb
commit 82f55d300b
1 changed files with 2 additions and 9 deletions

View File

@ -118,16 +118,9 @@ void PCB_BASE_EDIT_FRAME::SetGridVisibility( bool aVisible )
{
PCB_BASE_FRAME::SetGridVisibility( aVisible );
// We must notify the layer widget to refill the render view to update the grid checkbox
// Update the grid checkbox in the layer widget
if( m_Layers )
{
m_Layers->Freeze();
// TODO (ISM): Implement a SyncRenderState handler inside the layer widget to use instead
// This current method redraws the entire render panel and looks bad
m_Layers->ReFillRender();
m_Layers->Thaw();
}
m_Layers->SetRenderState( LAYER_GRID, aVisible );
// TODO (ISM): Remove this by changing toolbars to use the EVT_UPDATE_UI to get the state
SyncToolbars();