pcbnew: Set default line width for invalids
Invalid graphical items that cannot be created in pcbnew may still be created by external tools. This synchronizes the pcbnew view display with the gerber output and 3d viewer line widths for these types of lines. Only filled polygons are permitted 0-width lines. Fixes: lp:1790534 * https://bugs.launchpad.net/kicad/+bug/1790534
This commit is contained in:
parent
73c2297144
commit
1100ccb032
|
@ -1536,6 +1536,12 @@ DRAWSEGMENT* PCB_PARSER::parseDRAWSEGMENT()
|
|||
NeedRIGHT();
|
||||
}
|
||||
|
||||
// Only filled polygons may have a zero-line width
|
||||
// This is not permitted in KiCad but some external tools generate invalid
|
||||
// files.
|
||||
if( segment->GetShape() != S_POLYGON && segment->GetWidth() == 0 )
|
||||
segment->SetWidth( Millimeter2iu( DEFAULT_LINE_WIDTH ) );
|
||||
|
||||
return segment.release();
|
||||
}
|
||||
|
||||
|
@ -2294,6 +2300,12 @@ EDGE_MODULE* PCB_PARSER::parseEDGE_MODULE()
|
|||
NeedRIGHT();
|
||||
}
|
||||
|
||||
// Only filled polygons may have a zero-line width
|
||||
// This is not permitted in KiCad but some external tools generate invalid
|
||||
// files.
|
||||
if( segment->GetShape() != S_POLYGON && segment->GetWidth() == 0 )
|
||||
segment->SetWidth( Millimeter2iu( DEFAULT_LINE_WIDTH ) );
|
||||
|
||||
return segment.release();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue