Revert "Duplicate field names not allowed - throw exception on load"
This reverts commit 9f20816b24
.
This commit is contained in:
parent
e5ef33d227
commit
b0b523bfdb
|
@ -790,15 +790,6 @@ LIB_FIELD* SCH_SEXPR_PARSER::parseProperty( std::unique_ptr<LIB_SYMBOL>& aSymbol
|
|||
CurOffset() );
|
||||
}
|
||||
|
||||
if( LIB_FIELD* existingName = aSymbol->FindField( name ) )
|
||||
{
|
||||
if( existingName->GetId() > MANDATORY_FIELDS )
|
||||
{
|
||||
THROW_PARSE_ERROR( wxString::Format( _( "Duplicate field '%s'" ), name ),
|
||||
CurSource(), CurLine(), CurLineNumber(), CurOffset() );
|
||||
}
|
||||
}
|
||||
|
||||
field->SetName( name );
|
||||
|
||||
// Correctly set the ID based on canonical (untranslated) field name
|
||||
|
|
|
@ -669,19 +669,7 @@ void SCH_LEGACY_PLUGIN_CACHE::loadField( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
|||
}
|
||||
else
|
||||
{
|
||||
wxString fieldName = wxEmptyString;
|
||||
parseQuotedString( fieldName, aReader, line, &line, true ); // Optional.
|
||||
|
||||
if( fieldName.IsEmpty() )
|
||||
return;
|
||||
|
||||
if( aSymbol->FindField( fieldName ) != nullptr )
|
||||
{
|
||||
SCH_PARSE_ERROR( wxString::Format( _( "Duplicate field '%s'" ), fieldName ),
|
||||
aReader, line );
|
||||
}
|
||||
|
||||
field->m_name = fieldName;
|
||||
parseQuotedString( field->m_name, aReader, line, &line, true ); // Optional.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue