Pcbnew: add missing storage of dimension units and dimension precision in pcb files.

https://gitlab.com/kicad/code/kicad/issues/3712
This commit is contained in:
jean-pierre charras 2019-12-28 13:24:20 +01:00
parent e85701f405
commit 7241247fbc
3 changed files with 15 additions and 0 deletions

View File

@ -76,6 +76,8 @@ dielectric_constraints
dimension
diff_pair_width
diff_pair_gap
dimension_precision
dimension_units
drawings
drill
edge

View File

@ -634,6 +634,9 @@ void PCB_IO::formatDefaults( const BOARD_DESIGN_SETTINGS& aSettings, int aNestLe
aSettings.m_TextItalic[ LAYER_CLASS_OTHERS ] ? " italic" : "",
aSettings.m_TextUpright[ LAYER_CLASS_OTHERS ] ? " keep_upright" : "" );
m_out->Print( aNestLevel+1, "(dimension_units %d)\n", aSettings.m_DimensionUnits );
m_out->Print( aNestLevel+1, "(dimension_precision %d)\n", aSettings.m_DimensionPrecision );
m_out->Print( aNestLevel, ")\n" );
}

View File

@ -1725,6 +1725,16 @@ void PCB_PARSER::parseDefaults( BOARD_DESIGN_SETTINGS& designSettings )
parseDefaultTextDims( designSettings, LAYER_CLASS_OTHERS );
break;
case T_dimension_units:
designSettings.m_DimensionUnits = parseInt( "dimension units" );
NeedRIGHT();
break;
case T_dimension_precision:
designSettings.m_DimensionPrecision = parseInt( "dimension precision" );
NeedRIGHT();
break;
default:
Unexpected( CurText() );
}