Fix temporary variable type in schematic parser

The internal page info was switched to double in d8be69c3c1
but it was being rounded improperly to int on reading.
This commit is contained in:
Ian McInerney 2023-11-13 20:26:36 +00:00
parent cd05acac34
commit 1900000371
1 changed files with 2 additions and 2 deletions

View File

@ -1840,7 +1840,7 @@ void SCH_SEXPR_PARSER::parsePAGE_INFO( PAGE_INFO& aPageInfo )
if( pageType == PAGE_INFO::Custom )
{
int width = parseDouble( "width" );
double width = parseDouble( "width" );
// Perform some controls to avoid crashes if the size is edited by hands
if( width < MIN_PAGE_SIZE_MM )
@ -1848,7 +1848,7 @@ void SCH_SEXPR_PARSER::parsePAGE_INFO( PAGE_INFO& aPageInfo )
else if( width > MAX_PAGE_SIZE_EESCHEMA_MM )
width = MAX_PAGE_SIZE_EESCHEMA_MM;
int height = parseDouble( "height" );
double height = parseDouble( "height" );
if( height < MIN_PAGE_SIZE_MM )
height = MIN_PAGE_SIZE_MM;