Symbol Fields Table: better handle variable fields with attributes
Attributes need to be checked first since we do some internally hackery to make the checkboxes work. Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18005
This commit is contained in:
parent
ce758adca3
commit
21022b4fa4
|
@ -53,11 +53,10 @@ void FIELDS_EDITOR_GRID_DATA_MODEL::AddColumn( const wxString& aFieldName, const
|
|||
void FIELDS_EDITOR_GRID_DATA_MODEL::updateDataStoreSymbolField( const SCH_SYMBOL& aSymbol,
|
||||
const wxString& aFieldName )
|
||||
{
|
||||
if( const SCH_FIELD* field = aSymbol.GetFieldByName( aFieldName ) )
|
||||
m_dataStore[aSymbol.m_Uuid][aFieldName] = field->GetText();
|
||||
else if( isAttribute( aFieldName ) )
|
||||
if( isAttribute( aFieldName ) )
|
||||
m_dataStore[aSymbol.m_Uuid][aFieldName] = getAttributeValue( aSymbol, aFieldName );
|
||||
|
||||
else if( const SCH_FIELD* field = aSymbol.GetFieldByName( aFieldName ) )
|
||||
m_dataStore[aSymbol.m_Uuid][aFieldName] = field->GetText();
|
||||
// Handle fields with variables as names that are not present in the symbol
|
||||
// by giving them the correct value
|
||||
else if( IsTextVar( aFieldName ) )
|
||||
|
|
Loading…
Reference in New Issue