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.
From master, commit f5fd12c0
Fixes #10792
This commit is contained in:
jean-pierre charras 2022-10-08 16:15:16 +02:00
parent 8f9830eb92
commit 8dbfe79536
1 changed files with 2 additions and 1 deletions

View File

@ -531,7 +531,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;
m_frame.SyncLibraries( false );
}