Eeschema: fix incorrect parsing of line color (r v b values). Only the R and V were read, the parsing was stopping before reading the B value.

This commit is contained in:
jean-pierre charras 2018-12-09 17:59:00 +01:00
parent 805bb3160f
commit bc8739f930
1 changed files with 6 additions and 0 deletions

View File

@ -1238,8 +1238,14 @@ SCH_LINE* SCH_LEGACY_PLUGIN::loadWire( FILE_LINE_READER& aReader )
color[3] = 255;
for(; ii < prm_count && !is_eol( *line ); ii++ )
{
color[ii] = parseInt( aReader, line, &line );
// Skip the separator between values
if( *line == ',' || *line == ' ')
line++;
}
wire->SetLineColor( color[0]/255.0, color[1]/255.0, color[2]/255.0,color[3]/255.0 );
}
}