Don't store resolved values in symbol fields table editor dataStore.

We're going to use the dataStore to update the symbol, so
if we store resolved values it will nuke any text variables
even if the field wasn't edited.

Not sure if the BOM generator has a separate resolve-variables
step or not.  But it will need one as the code removed here
only worked for Values and Footprint fields anyway.
This commit is contained in:
Jeff Young 2023-05-04 00:08:09 +01:00
parent 4cdf75dc72
commit f4fa5bb0fc
1 changed files with 2 additions and 12 deletions

View File

@ -213,18 +213,8 @@ public:
for( unsigned i = 0; i < m_symbolsList.GetCount(); ++i )
{
SCH_SYMBOL* symbol = m_symbolsList[ i ].GetSymbol();
wxCHECK( symbol && ( symbol->GetInstanceReferences().size() != 0 ), /* void */ );
wxString val = symbol->GetFieldText( aFieldName );
if( aFieldName == wxT( "Value" ) )
val = symbol->GetValueFieldText( true );
else if( aFieldName == wxT( "Footprint" ) )
val = symbol->GetFootprintFieldText( true );
m_dataStore[ symbol->m_Uuid ][ aFieldName ] = val;
if( SCH_SYMBOL* symbol = m_symbolsList[ i ].GetSymbol() )
m_dataStore[ symbol->m_Uuid ][ aFieldName ] = symbol->GetFieldText( aFieldName );
}
}