Symbol Library Editor: save sym-lib-table only if it had been modified

This commit is contained in:
Maciej Suminski 2018-01-31 10:46:01 +01:00
parent 0e9dedf3cd
commit 0668cd9d4c
1 changed files with 3 additions and 5 deletions

View File

@ -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;
}