Improve shutdown performance.
This commit is contained in:
parent
97c34e2516
commit
80846dcbc7
|
@ -84,7 +84,8 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
|
|||
m_autoSaveState( false ),
|
||||
m_autoSaveInterval(-1 ),
|
||||
m_UndoRedoCountMax( DEFAULT_MAX_UNDO_ITEMS ),
|
||||
m_userUnits( EDA_UNITS::MILLIMETRES )
|
||||
m_userUnits( EDA_UNITS::MILLIMETRES ),
|
||||
m_shuttingDown( false )
|
||||
{
|
||||
m_autoSaveTimer = new wxTimer( this, ID_AUTO_SAVE_TIMER );
|
||||
m_mruPath = wxStandardPaths::Get().GetDocumentsDir();
|
||||
|
@ -656,7 +657,7 @@ void EDA_BASE_FRAME::UpdateFileHistory( const wxString& FullFileName, FILE_HISTO
|
|||
aFileHistory->AddFileToHistory( FullFileName );
|
||||
|
||||
// Update the menubar to update the file history menu
|
||||
if( GetMenuBar() )
|
||||
if( !m_shuttingDown && GetMenuBar() )
|
||||
{
|
||||
ReCreateMenuBar();
|
||||
GetMenuBar()->Refresh();
|
||||
|
|
|
@ -629,6 +629,7 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent )
|
|||
//
|
||||
// OK, we're really closing now. No more returns after this.
|
||||
//
|
||||
m_shuttingDown = true;
|
||||
|
||||
// Shutdown all running tools ( and commit any pending change )
|
||||
if( m_toolManager )
|
||||
|
|
|
@ -163,6 +163,8 @@ protected:
|
|||
|
||||
EDA_UNITS m_userUnits;
|
||||
|
||||
bool m_shuttingDown;
|
||||
|
||||
// Map containing the UI update handlers registered with wx for each action
|
||||
std::map<int, UIUpdateHandler> m_uiUpdateMap;
|
||||
|
||||
|
|
|
@ -813,6 +813,8 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent )
|
|||
}
|
||||
}
|
||||
|
||||
m_shuttingDown = true;
|
||||
|
||||
// On Windows 7 / 32 bits, on OpenGL mode only, Pcbnew crashes
|
||||
// when closing this frame if a footprint was selected, and the footprint editor called
|
||||
// to edit this footprint, and when closing pcbnew if this footprint is still selected
|
||||
|
|
Loading…
Reference in New Issue