From 05d9f49d25695f7cb95aee8867ee8375ba17880a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 24 Nov 2018 15:28:07 +0000 Subject: [PATCH] Init icon scale when reading it from PCB prefs. Fixes: lp:1804926 * https://bugs.launchpad.net/kicad/+bug/1804926 --- common/pgm_base.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index fd95e5dda8..6235890836 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -567,11 +567,12 @@ void PGM_BASE::loadCommonSettings() if( !m_common_settings->HasEntry( ICON_SCALE_KEY ) ) { - wxString value; + int temp; + wxString msg; bool option; - pcbnewConfig->Read( "PcbIconScale", &value ); - m_common_settings->Write( ICON_SCALE_KEY, value ); + pcbnewConfig->Read( "PcbIconScale", &temp, 0 ); + m_common_settings->Write( ICON_SCALE_KEY, temp ); pcbnewConfig->Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false ); m_common_settings->Write( ENBL_MOUSEWHEEL_PAN_KEY, option );