LIB_SYMBOL: When assigning, clear the parent if needed

This allows assigning a symbol with no parent to a symbol with
a parent to work more as expected.
This commit is contained in:
John Beard 2025-09-02 23:29:00 +08:00
parent de8c4d4b01
commit 0ede830f54

View File

@ -216,8 +216,7 @@ const LIB_SYMBOL& LIB_SYMBOL::operator=( const LIB_SYMBOL& aSymbol )
LIB_SYMBOL_SPTR parent = aSymbol.m_parent.lock(); LIB_SYMBOL_SPTR parent = aSymbol.m_parent.lock();
if( parent ) SetParent( parent.get() );
SetParent( parent.get() );
EMBEDDED_FILES::operator=( aSymbol ); EMBEDDED_FILES::operator=( aSymbol );