CADSTAR Sch: TERMATTR may have more than one attribute subnode

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13526
This commit is contained in:
Roberto Fernandez Bautista 2023-03-26 15:54:21 +01:00
parent 604a7d69db
commit fc04f5135f
2 changed files with 6 additions and 6 deletions

View File

@ -559,14 +559,14 @@ void CADSTAR_SCH_ARCHIVE_PARSER::TERMATTR::Parse( XNODE* aNode, PARSER_CONTEXT*
TerminalID = GetXmlAttributeIDLong( aNode, 0 );
XNODE* cNode = aNode->GetChildren();
bool attrParsed = false;
for( ; cNode; cNode = cNode->GetNext() )
{
if( !attrParsed && cNode->GetName() == wxT( "ATTR" ) )
if( cNode->GetName() == wxT( "ATTR" ) )
{
Value.Parse( cNode, aContext );
attrParsed = true;
ATTRIBUTE_VALUE val;
val.Parse( cNode, aContext );
Attributes.push_back( val );
}
else
{

View File

@ -207,7 +207,7 @@ public:
struct TERMATTR : PARSER
{
TERMINAL_ID TerminalID;
ATTRIBUTE_VALUE Value;
std::vector<ATTRIBUTE_VALUE> Attributes;
void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
};