Eeschema: fix bug loading grid size from previous session. (fixes lp:1239445)
This commit is contained in:
parent
bae5780dc3
commit
a3f0e450ab
|
@ -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,
|
||||||
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 )
|
||||||
|
|
Loading…
Reference in New Issue