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)

This commit is contained in:
jean-pierre charras 2016-01-28 08:51:09 +01:00
parent ac54b7d114
commit 3a9cbbe0bb
1 changed files with 3 additions and 2 deletions

View File

@ -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 ) );