From f4fa5bb0fc3e715e8a16b8897ba3e953276db131 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 4 May 2023 00:08:09 +0100 Subject: [PATCH] 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. --- eeschema/dialogs/dialog_symbol_fields_table.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/eeschema/dialogs/dialog_symbol_fields_table.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp index e5bef2e4f1..c87956666a 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -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 ); } }