Symbol Editor: Fix reverting changes on a root symbol: derived symbols are displayed wrong

Reverting changes broke links between derived symbols and the root symbol.
Now fixed by do not delete and recreate reverted symbol.
Fixes #10792
https://gitlab.com/kicad/code/kicad/issues/10792
This commit is contained in:
jean-pierre charras 2022-10-08 15:56:07 +02:00
parent aaa1d166a7
commit f5fd12c002
1 changed files with 2 additions and 1 deletions

View File

@ -528,7 +528,8 @@ LIB_ID SYMBOL_LIBRARY_MANAGER::RevertSymbol( const wxString& aAlias, const wxStr
}
else
{
symbolBuf->SetSymbol( new LIB_SYMBOL( original ) );
// copy the initial data to the current symbol to restore
*symbolBuf->GetSymbol() = original;
OnDataChanged();
}