Allow schematic symbol value and footprint fields to be instantiated.

This commit is contained in:
Wayne Stambaugh 2022-10-05 11:12:21 -04:00
parent f80b48e1b0
commit 0336cff8d6
2 changed files with 5 additions and 4 deletions

View File

@ -658,9 +658,9 @@ void DIALOG_SCH_FIELD_PROPERTIES::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH
if( fieldType == REFERENCE_FIELD ) if( fieldType == REFERENCE_FIELD )
symbol->SetRef( aSheetPath, m_text ); symbol->SetRef( aSheetPath, m_text );
else if( fieldType == VALUE_FIELD ) else if( fieldType == VALUE_FIELD )
symbol->SetValue( m_text ); symbol->SetValue( aSheetPath, m_text );
else if( fieldType == FOOTPRINT_FIELD ) else if( fieldType == FOOTPRINT_FIELD )
symbol->SetFootprint( m_text ); symbol->SetFootprint( aSheetPath, m_text );
} }
else if( parent && parent->Type() == SCH_GLOBAL_LABEL_T ) else if( parent && parent->Type() == SCH_GLOBAL_LABEL_T )
{ {

View File

@ -705,8 +705,9 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow()
// Similar for Value and Footprint, except that the GUI behaviour is that they are kept // Similar for Value and Footprint, except that the GUI behaviour is that they are kept
// in sync between multiple instances. // in sync between multiple instances.
m_symbol->SetValue( m_fields->at( VALUE_FIELD ).GetText() ); m_symbol->SetValue( &GetParent()->GetCurrentSheet(), m_fields->at( VALUE_FIELD ).GetText() );
m_symbol->SetFootprint( m_fields->at( FOOTPRINT_FIELD ).GetText() ); m_symbol->SetFootprint( &GetParent()->GetCurrentSheet(),
m_fields->at( FOOTPRINT_FIELD ).GetText() );
m_symbol->SetIncludeInBom( !m_cbExcludeFromBom->IsChecked() ); m_symbol->SetIncludeInBom( !m_cbExcludeFromBom->IsChecked() );
m_symbol->SetIncludeOnBoard( !m_cbExcludeFromBoard->IsChecked() ); m_symbol->SetIncludeOnBoard( !m_cbExcludeFromBoard->IsChecked() );