Fixes: lp:1622184 (pl-editor doesn't save text thickness when it is not the default value)

https://bugs.launchpad.net/kicad/+bug/1622184
This commit is contained in:
jp-charras 2016-09-10 17:16:48 +02:00
parent 7318238daa
commit 5710681f7e
1 changed files with 8 additions and 1 deletions

View File

@ -246,11 +246,18 @@ void WORKSHEET_LAYOUT_IO::format( WORKSHEET_DATAITEM_TEXT* aItem, int aNestLevel
// Write font info, only if it is not the default setup
bool write_size = aItem->m_TextSize.x != 0.0 || aItem->m_TextSize.y != 0.0;
bool write_thickness = aItem->m_LineWidth != 0.0;
if( write_size || aItem->IsBold() || aItem->IsItalic() )
if( write_thickness || write_size || aItem->IsBold() || aItem->IsItalic() )
{
m_out->Print( 0, " (%s", getTokenName( T_font ) );
if( write_thickness )
{
m_out->Print( 0, " (%s %s)", getTokenName( T_linewidth ),
double2Str(aItem->m_LineWidth ).c_str() );
}
if( write_size )
{
m_out->Print( 0, " (%s %s %s)", getTokenName( T_size ),