At very first launch, old settings/config does not exist

KiCad read incorrect value for window position and it's size at very
first launch, which results in invisble/inaccessible window on Mac OSX.
Set correct default values for these settings fixes this issue.
And fix a typo in comment.
This commit is contained in:
Shivpratap Chauhan 2018-05-01 13:44:23 +05:30 committed by Wayne Stambaugh
parent 295941c14d
commit 26197c333e
2 changed files with 5 additions and 5 deletions

View File

@ -273,16 +273,16 @@ void EDA_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )
wxString baseCfgName = ConfigBaseName();
wxString text = baseCfgName + entryPosX;
aCfg->Read( text, &m_FramePos.x );
aCfg->Read( text, &m_FramePos.x, m_FramePos.x );
text = baseCfgName + entryPosY;
aCfg->Read( text, &m_FramePos.y );
aCfg->Read( text, &m_FramePos.y, m_FramePos.y );
text = baseCfgName + entrySizeX;
aCfg->Read( text, &m_FrameSize.x, wxDefaultSize.x );
aCfg->Read( text, &m_FrameSize.x, m_FrameSize.x );
text = baseCfgName + entrySizeY;
aCfg->Read( text, &m_FrameSize.y, wxDefaultSize.x );
aCfg->Read( text, &m_FrameSize.y, m_FrameSize.y );
text = baseCfgName + entryMaximized;
aCfg->Read( text, &maximized, 0 );

View File

@ -67,7 +67,7 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent,
icon.CopyFromBitmap( KiBitmap( icon_kicad_xpm ) );
SetIcon( icon );
// Give the last sise and pos to main window
// Give the last size and pos to main window
LoadSettings( config() );
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );