Commit a3f0e450 authored by Wayne Stambaugh's avatar Wayne Stambaugh

Eeschema: fix bug loading grid size from previous session. (fixes lp:1239445)

parent bae5780d
...@@ -221,12 +221,13 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, ...@@ -221,12 +221,13 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent,
SetCrossHairPosition( wxPoint( 0, 0 ) ); SetCrossHairPosition( wxPoint( 0, 0 ) );
// Initialize grid id to the default value 50 mils:
m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000;
LoadSettings(); LoadSettings();
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
// Initialize grid id to the default value 50 mils:
m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000;
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
if( m_canvas ) if( m_canvas )
......
...@@ -208,11 +208,12 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle, ...@@ -208,11 +208,12 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle,
icon.CopyFromBitmap( KiBitmap( icon_eeschema_xpm ) ); icon.CopyFromBitmap( KiBitmap( icon_eeschema_xpm ) );
SetIcon( icon ); SetIcon( icon );
// Initialize grid id to the default value (50 mils):
m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000;
/* Get config */ /* Get config */
LoadSettings(); LoadSettings();
// Initialize grid id to the default value (50 mils):
m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000;
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
if( m_canvas ) if( m_canvas )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment