Browse Source

Fix potentially incorrect libid when using save as

If you use save as into a different library and change the symbol name
while overwriting an existing symbol, the libid didn't get updated,
leading to an error message when trying to load the newly saved symbol.
jobs
Seth Hillbrand 2 years ago
parent
commit
b38357a5ea
  1. 4
      eeschema/symbol_library_manager.cpp

4
eeschema/symbol_library_manager.cpp

@ -479,7 +479,11 @@ bool SYMBOL_LIBRARY_MANAGER::UpdateSymbol( LIB_SYMBOL* aSymbol, const wxString&
wxCHECK( bufferedSymbol, false );
// If we are coming from a different library, the library ID needs to be preserved
auto libId = bufferedSymbol->GetLibId();
*bufferedSymbol = *aSymbol;
bufferedSymbol->SetLibId( libId );
symbolBuf->GetScreen()->SetContentModified();
}
else // New symbol

Loading…
Cancel
Save