Pcbnew, Plot dialog, Gerber format: Enable or disable adding net metadata both in X1 and X2 format. Previously, this option was existing only in X2 format. Should be existing in both formats.

A bit of cleaning code related to this option.
This commit is contained in:
jean-pierre charras
2018-12-09 08:38:23 +01:00
parent dd9a001077
commit 7f20c55ed6
8 changed files with 195 additions and 1767 deletions
+5 -7
View File
@@ -59,7 +59,7 @@ GERBER_PLOTTER::GERBER_PLOTTER()
// happen easily.
m_gerberUnitInch = false;
m_gerberUnitFmt = 6;
m_useX2Attributes = false;
m_useX2Attributes = true;
m_useNetAttributes = true;
}
@@ -144,13 +144,11 @@ void GERBER_PLOTTER::formatNetAttribute( GBR_NETLIST_METADATA* aData )
if( aData == NULL )
return;
bool useX1StructuredComment = false;
if( !m_useX2Attributes )
useX1StructuredComment = true;
else if( !m_useNetAttributes )
if( !m_useNetAttributes )
return;
bool useX1StructuredComment = !m_useX2Attributes;
bool clearDict;
std::string short_attribute_string;
@@ -325,7 +323,7 @@ void GERBER_PLOTTER::selectAperture( const wxSize& aSize,
( currentAperture->m_Type != aType ) ||
( currentAperture->m_Size != aSize );
if( m_useX2Attributes && !m_useNetAttributes )
if( !m_useNetAttributes )
aApertureAttribute = 0;
else
change = change || ( currentAperture->m_ApertureAttribute != aApertureAttribute );