Fix broken symbol field table editor dialog.
Do not use the symbol field string to populate the value and footprint grid cells. The field strings may be empty because the symbol has not been instantiated yet by entering a sheet. This fix makes an incorrect assumption that the first instance value and footprint data in the symbol is the same for all instances. Note: this fix is incomplete because the value and footprint fields are can now be different between sheet instances. The entire field table editor design will need to be rethought because the current grouping doesn't allow different value and footprint instance changes. Fixes https://gitlab.com/kicad/code/kicad/-/issues/11194
This commit is contained in:
parent
cf33cfcad1
commit
b87fc45e33
|
@ -209,7 +209,17 @@ public:
|
||||||
for( unsigned i = 0; i < m_symbolsList.GetCount(); ++i )
|
for( unsigned i = 0; i < m_symbolsList.GetCount(); ++i )
|
||||||
{
|
{
|
||||||
SCH_SYMBOL* symbol = m_symbolsList[ i ].GetSymbol();
|
SCH_SYMBOL* symbol = m_symbolsList[ i ].GetSymbol();
|
||||||
m_dataStore[ symbol->m_Uuid ][ aFieldName ] = symbol->GetFieldText( aFieldName );
|
|
||||||
|
wxCHECK( symbol && ( symbol->GetInstanceReferences().size() != 0 ), /* void */ );
|
||||||
|
|
||||||
|
wxString val = symbol->GetFieldText( aFieldName );
|
||||||
|
|
||||||
|
if( aFieldName == wxT( "Value" ) )
|
||||||
|
val = symbol->GetInstanceReferences()[0].m_Value;
|
||||||
|
else if( aFieldName == wxT( "Footprint" ) )
|
||||||
|
val = symbol->GetInstanceReferences()[0].m_Footprint;
|
||||||
|
|
||||||
|
m_dataStore[ symbol->m_Uuid ][ aFieldName ] = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue