SYMBOL_LIBRARY_MANAGER::SaveLibrary(): Add missing code.

It fixes an issue after deleting a symbol and trying to save the library:
The library, although saved, was always flagged as modified.
This commit is contained in:
jean-pierre charras 2022-10-12 15:56:21 +02:00
parent d0d625dcb5
commit 806b5fab0e
1 changed files with 3 additions and 2 deletions

View File

@ -190,11 +190,12 @@ bool SYMBOL_LIBRARY_MANAGER::SaveLibrary( const wxString& aLibrary, const wxStri
// clear the deleted symbols buffer only if data is saved to the original file
wxFileName original, destination( aFileName );
auto row = GetLibrary( aLibrary );
SYMBOL_LIB_TABLE_ROW* row = GetLibrary( aLibrary );
if( row )
{
original = row->GetFullURI();
original.Normalize( FN_NORMALIZE_FLAGS | wxPATH_NORM_ENV_VARS );
}
destination.Normalize( FN_NORMALIZE_FLAGS | wxPATH_NORM_ENV_VARS );