Apply symbol attributes from base symbol, not derived symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/13740
This commit is contained in:
parent
8fd4909f86
commit
d4b4abd001
|
@ -589,8 +589,10 @@ int DIALOG_CHANGE_SYMBOLS::processSymbols( const std::map<SCH_SYMBOL*,
|
|||
|
||||
if( m_resetAttributes->GetValue() )
|
||||
{
|
||||
symbol->SetIncludeInBom( libSymbol->GetIncludeInBom() );
|
||||
symbol->SetIncludeOnBoard( libSymbol->GetIncludeOnBoard() );
|
||||
// Fetch the attributes from the *flattened* library symbol. They are not supported
|
||||
// in derived symbols.
|
||||
symbol->SetIncludeInBom( symbol->GetLibSymbolRef()->GetIncludeInBom() );
|
||||
symbol->SetIncludeOnBoard( symbol->GetLibSymbolRef()->GetIncludeOnBoard() );
|
||||
}
|
||||
|
||||
bool removeExtras = m_removeExtraBox->GetValue();
|
||||
|
|
|
@ -647,6 +647,10 @@ std::unique_ptr< LIB_SYMBOL > LIB_SYMBOL::Flatten() const
|
|||
retv->SetKeyWords( m_keyWords.IsEmpty() ? parent->GetKeyWords() : m_keyWords );
|
||||
retv->SetDescription( m_description.IsEmpty() ? parent->GetDescription() : m_description );
|
||||
retv->SetFPFilters( m_fpFilters.IsEmpty() ? parent->GetFPFilters() : m_fpFilters );
|
||||
|
||||
retv->SetIncludeInBom( parent->GetIncludeInBom() );
|
||||
retv->SetIncludeOnBoard( parent->GetIncludeOnBoard() );
|
||||
|
||||
retv->UpdateFieldOrdinals();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -141,13 +141,12 @@ SCH_SYMBOL::SCH_SYMBOL( const LIB_SYMBOL& aSymbol, const LIB_ID& aLibId,
|
|||
m_prefix = UTIL::GetRefDesPrefix( m_part->GetReferenceField().GetText() );
|
||||
|
||||
if( aSheet )
|
||||
{
|
||||
SetRef( aSheet, UTIL::GetRefDesUnannotated( m_prefix ) );
|
||||
}
|
||||
|
||||
// Inherit the include in bill of materials and board netlist settings from library symbol.
|
||||
m_inBom = aSymbol.GetIncludeInBom();
|
||||
m_onBoard = aSymbol.GetIncludeOnBoard();
|
||||
// Inherit the include in bill of materials and board netlist settings from flattened
|
||||
// library symbol.
|
||||
m_inBom = m_part->GetIncludeInBom();
|
||||
m_onBoard = m_part->GetIncludeOnBoard();
|
||||
m_DNP = false;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue