eagle: Use width on imported lines if available

If not, use the current board design settings for line thickness based
on the board layer.

(cherry picked from commit c80e3e0ffc)
This commit is contained in:
Seth Hillbrand 2019-05-19 19:33:27 -07:00
parent d06b42b917
commit f0ce4d6336
1 changed files with 8 additions and 1 deletions

View File

@ -495,6 +495,12 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
if( layer != UNDEFINED_LAYER )
{
DRAWSEGMENT* dseg = new DRAWSEGMENT( m_board );
int width = w.width.ToPcbUnits();
// KiCad cannot handle zero or negative line widths
if( width <= 0 )
width = m_board->GetDesignSettings().GetLineThickness( layer );
m_board->Add( dseg, ADD_APPEND );
if( !w.curve )
@ -514,8 +520,9 @@ void EAGLE_PLUGIN::loadPlain( wxXmlNode* aGraphics )
dseg->SetTimeStamp( EagleTimeStamp( gr ) );
dseg->SetLayer( layer );
dseg->SetWidth( Millimeter2iu( DEFAULT_PCB_EDGE_THICKNESS ) );
dseg->SetWidth( width );
}
m_xpath->pop();
}
else if( grName == "text" )