From 3a9cbbe0bb7031083a3be611eceeb6c3c7e7beeb Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 28 Jan 2016 08:51:09 +0100 Subject: [PATCH] pagelayout editor: fix Bug #1538603 (pl_editor does not save custom text size if only one of the X or Y size value is not default) --- pagelayout_editor/page_layout_writer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pagelayout_editor/page_layout_writer.cpp b/pagelayout_editor/page_layout_writer.cpp index f2f539f0d3..286733da48 100644 --- a/pagelayout_editor/page_layout_writer.cpp +++ b/pagelayout_editor/page_layout_writer.cpp @@ -237,8 +237,9 @@ void WORKSHEET_LAYOUT_IO::format( WORKSHEET_DATAITEM_TEXT* aItem, int aNestLevel m_out->Print( 0, " (%s %s)", getTokenName( T_rotate ), double2Str(aItem->m_Orient ).c_str() ); - // Write font info - bool write_size = aItem->m_TextSize.x != 0.0 && aItem->m_TextSize.y != 0.0; + // 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; + if( write_size || aItem->IsBold() || aItem->IsItalic() ) { m_out->Print( 0, " (%s", getTokenName( T_font ) );