Gerbview: Gerber attributes display: fix incorrect attributes deletion.
The Gerber attribute deletion command (%TD,xxx) always cleared all attributes,
instead of clearing xxx attribute.
Therefore some attributes were not always displayed.
From master branch, commit 7206b567
This commit is contained in:
parent
5c7ac1bb7e
commit
693aec949c
|
@ -385,9 +385,10 @@ void GERBER_FILE_IMAGE::RemoveAttribute( X2_ATTRIBUTE& aAttribute )
|
|||
* if a attribute name is specified (for instance %TD.CN*%) is specified,
|
||||
* only this attribute is cleared
|
||||
*/
|
||||
m_NetAttributeDict.ClearAttribute( &aAttribute.GetPrm( 1 ) );
|
||||
wxString cmd = aAttribute.GetPrm( 0 );
|
||||
m_NetAttributeDict.ClearAttribute( &cmd );
|
||||
|
||||
if( aAttribute.GetPrm( 1 ).IsEmpty() || aAttribute.GetPrm( 1 ) == ".AperFunction" )
|
||||
if( cmd.IsEmpty() || cmd == ".AperFunction" )
|
||||
m_AperFunction.Clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -171,8 +171,10 @@ bool GERBER_FILE_IMAGE::ReadRS274XCommand( char *aBuff, unsigned int aBuffSize,
|
|||
default:
|
||||
code_command = ReadXCommandID( aText );
|
||||
ok = ExecuteRS274XCommand( code_command, aBuff, aBuffSize, aText );
|
||||
|
||||
if( !ok )
|
||||
goto exit;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue