Pcbnew, layer manager: fix flicker when loading a file, and incorrect size on start when no file is loaded

From master, commit b25ffc0
This commit is contained in:
jean-pierre charras 2019-08-19 10:58:45 +02:00
parent dcd31f5701
commit 06bde527d5
2 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,8 @@
#include <build_version.h> // LEGACY_BOARD_FILE_VERSION
#include <wx/stdpaths.h>
#include <pcb_layer_widget.h>
#include <wx/wupdlock.h>
//#define USE_INSTRUMENTATION 1
@ -435,6 +437,8 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
return false;
}
wxWindowUpdateLocker no_update( m_Layers ); // Avoid flicker when rebuilding m_Layers
Clear_Pcb( false ); // pass false since we prompted above for a modified board
IO_MGR::PCB_FILE_T pluginType = plugin_type( fullFileName, aCtl );

View File

@ -73,6 +73,7 @@
#include <gestfich.h>
#include <executable_names.h>
#include <eda_dockart.h>
#include <wx/wupdlock.h>
#if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON)
#include <python_scripting.h>
@ -563,6 +564,7 @@ void PCB_EDIT_FRAME::setupTools()
void PCB_EDIT_FRAME::ReFillLayerWidget()
{
wxWindowUpdateLocker no_update( m_Layers );
m_Layers->ReFill();
wxAuiPaneInfo& lyrs = m_auimgr.GetPane( m_Layers );