From f5fd12c002cde3b5b8d30965c00ae2644958b9cb Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 8 Oct 2022 15:56:07 +0200 Subject: [PATCH] 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 --- eeschema/symbol_library_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeschema/symbol_library_manager.cpp b/eeschema/symbol_library_manager.cpp index 5d409110c3..e8fbea1dd9 100644 --- a/eeschema/symbol_library_manager.cpp +++ b/eeschema/symbol_library_manager.cpp @@ -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(); }