Default graphical line style in v6 and older was Dashed.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16479
This commit is contained in:
Alex Shvartzkop 2023-12-31 19:28:50 +05:00
parent 71b9dd1fb4
commit aa6fd88082
2 changed files with 9 additions and 0 deletions

View File

@ -798,6 +798,10 @@ SCH_LINE* SCH_IO_KICAD_LEGACY::loadWire( LINE_READER& aReader )
if( !strCompare( "Line", line, &line ) )
SCH_PARSE_ERROR( "invalid wire definition", aReader, line );
// The default graphical line style was Dashed.
if( wire->GetLayer() == LAYER_NOTES )
wire->SetLineStyle( LINE_STYLE::DASH );
// Since Sept 15, 2017, a line style is alloved (width, style, color)
// Only non default values are stored
while( !is_eol( *line ) )

View File

@ -3611,6 +3611,11 @@ SCH_SHAPE* SCH_IO_KICAD_SEXPR_PARSER::parseSchPolyLine()
case T_stroke:
parseStroke( stroke );
// In 6.0, the default schematic line style was Dashed.
if( m_requiredVersion <= 20211123 && stroke.GetLineStyle() == LINE_STYLE::DEFAULT )
stroke.SetLineStyle( LINE_STYLE::DASH );
polyline->SetStroke( stroke );
break;