From 2c0fe8f59504f903b7ee7669e15e7dee80687f0a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 3 Oct 2018 09:46:17 +0200 Subject: [PATCH] Pcbnew: minor fix: avoid flicker in Layer Manager when closing Pcbnew. It was due to useless paint events during closing, on some platforms. --- pcbnew/footprint_edit_frame.cpp | 5 +++++ pcbnew/pcb_edit_frame.cpp | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index 679d411fdd..513b87b907 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -522,6 +522,11 @@ void FOOTPRINT_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) GetGalCanvas()->StopDrawing(); } + // Do not show the layer manager during closing to avoid flicker + // on some platforms (Windows) that generate useless redraw of items in + // the Layer Manger + m_auimgr.GetPane( "LayersManager" ).Show( false ); + Clear_Pcb( false ); //close the editor diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 35a3d6f9c8..a51c9aca60 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -626,6 +626,12 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) wxMessageBox( msg, Pgm().App().GetAppName(), wxOK | wxICON_ERROR, this ); } + // Do not show the layer manager during closing to avoid flicker + // on some platforms (Windows) that generate useless redraw of items in + // the Layer Manger + if( m_show_layer_manager_tools ) + m_auimgr.GetPane( "LayersManager" ).Show( false ); + // Delete board structs and undo/redo lists, to avoid crash on exit // when deleting some structs (mainly in undo/redo lists) too late Clear_Pcb( false );