Make sure copied SCH_PINs get their LIB_PIN pointers set.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15536
This commit is contained in:
parent
d7a3c35f56
commit
9fae110031
|
@ -190,8 +190,12 @@ SCH_SYMBOL::SCH_SYMBOL( const SCH_SYMBOL& aSymbol ) :
|
||||||
|
|
||||||
m_pins.clear();
|
m_pins.clear();
|
||||||
|
|
||||||
|
// Copy (and re-parent) the pins
|
||||||
for( const std::unique_ptr<SCH_PIN>& pin : aSymbol.m_pins )
|
for( const std::unique_ptr<SCH_PIN>& pin : aSymbol.m_pins )
|
||||||
m_pins.emplace_back( std::make_unique<SCH_PIN>( this, pin->GetNumber(), pin->GetAlt() ) );
|
{
|
||||||
|
m_pins.emplace_back( std::make_unique<SCH_PIN>( *pin ) );
|
||||||
|
m_pins.back()->SetParent( this );
|
||||||
|
}
|
||||||
|
|
||||||
m_fieldsAutoplaced = aSymbol.m_fieldsAutoplaced;
|
m_fieldsAutoplaced = aSymbol.m_fieldsAutoplaced;
|
||||||
m_schLibSymbolName = aSymbol.m_schLibSymbolName;
|
m_schLibSymbolName = aSymbol.m_schLibSymbolName;
|
||||||
|
|
Loading…
Reference in New Issue