mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-18 16:09:18 +00:00
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.
This commit is contained in:
parent
8219ccf721
commit
b38357a5ea
@ -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…
Reference in New Issue
Block a user