diff --git a/eeschema/lib_edit_frame.cpp b/eeschema/lib_edit_frame.cpp index f298e50072..b23f54c62f 100644 --- a/eeschema/lib_edit_frame.cpp +++ b/eeschema/lib_edit_frame.cpp @@ -349,14 +349,9 @@ LIB_EDIT_FRAME::~LIB_EDIT_FRAME() void LIB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) { if( saveAllLibraries() ) - { - saveSymbolLibTables( true, true ); Destroy(); - } else - { Event.Veto(); - } } @@ -1570,6 +1565,9 @@ bool LIB_EDIT_FRAME::addLibraryFile( bool aCreateNew ) DisplayError( this, _( "Could not open the library file." ) ); } + bool globalTable = ( libTable == &SYMBOL_LIB_TABLE::GetGlobalLibTable() ); + saveSymbolLibTables( globalTable, !globalTable ); + return res; }