From 5710681f7e61660a5259b213ff943d6b7945c436 Mon Sep 17 00:00:00 2001 From: jp-charras Date: Sat, 10 Sep 2016 17:16:48 +0200 Subject: [PATCH] Fixes: lp:1622184 (pl-editor doesn't save text thickness when it is not the default value) https://bugs.launchpad.net/kicad/+bug/1622184 --- pagelayout_editor/page_layout_writer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pagelayout_editor/page_layout_writer.cpp b/pagelayout_editor/page_layout_writer.cpp index 4c298f3d6c..07d3dda5af 100644 --- a/pagelayout_editor/page_layout_writer.cpp +++ b/pagelayout_editor/page_layout_writer.cpp @@ -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 ),