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:
parent
295941c14d
commit
26197c333e
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue