Fix broken value and footprint field text values.
Only update value and footprint fields from instance data if it's not empty. These fields were not always stored in the instance data so loading them from instance data that does not contain them will clear the fields. https://gitlab.com/kicad/code/kicad/-/issues/13735
This commit is contained in:
parent
b427ad80f6
commit
9e03a71b44
|
@ -1102,8 +1102,13 @@ void SCH_SHEET_LIST::UpdateSymbolInstanceData(
|
|||
// the full path here.
|
||||
symbol->AddHierarchicalReference( sheetPath.Path(), it->m_Reference, it->m_Unit );
|
||||
symbol->GetField( REFERENCE_FIELD )->SetText( it->m_Reference );
|
||||
symbol->SetValueFieldText( it->m_Value );
|
||||
symbol->SetFootprintFieldText( it->m_Footprint );
|
||||
|
||||
if( !it->m_Value.IsEmpty() )
|
||||
symbol->SetValueFieldText( it->m_Value );
|
||||
|
||||
if( !it->m_Footprint.IsEmpty() )
|
||||
symbol->SetFootprintFieldText( it->m_Footprint );
|
||||
|
||||
symbol->UpdatePrefix();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue