From 9e03a71b4452c47e17e52302d0bd5f00f25cb734 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 3 Feb 2023 09:48:00 -0500 Subject: [PATCH] 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 --- eeschema/sch_sheet_path.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp index f7e6c42050..6c9062c47e 100644 --- a/eeschema/sch_sheet_path.cpp +++ b/eeschema/sch_sheet_path.cpp @@ -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(); } }