From 0668cd9d4c0a383864a60da42ea6563f01acd395 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 31 Jan 2018 10:46:01 +0100 Subject: [PATCH] Symbol Library Editor: save sym-lib-table only if it had been modified --- eeschema/lib_edit_frame.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; }