Browse Source

Start an empty document with a reasonable grid size.

pull/13/head
Jeff Young 7 years ago
parent
commit
9e9db3afe5
  1. 2
      eeschema/libedit/lib_edit_frame.cpp
  2. 2
      eeschema/sch_edit_frame.cpp
  3. 1
      eeschema/sch_preview_panel.cpp
  4. 3
      eeschema/viewlib_frame.cpp

2
eeschema/libedit/lib_edit_frame.cpp

@ -239,7 +239,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
SetPresetGrid( m_LastGridSizeId );
if( m_canvas )
m_canvas->SetEnableBlockCommands( true );

2
eeschema/sch_edit_frame.cpp

@ -407,6 +407,8 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
if( !GetScreen()->GridExists( m_LastGridSizeId + ID_POPUP_GRID_LEVEL_1000 ) )
m_LastGridSizeId = default_grid;
SetPresetGrid( m_LastGridSizeId );
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
if( m_canvas )

1
eeschema/sch_preview_panel.cpp

@ -68,6 +68,7 @@ SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL( wxWindow* aParentWindow, wxWindowID aWindo
m_gal->SetGridColor( COLOR4D(0.0, 0.0, 0.0, 1.0) );
m_gal->SetCursorColor( COLOR4D(0.0, 0.0, 0.0, 1.0) );
m_gal->SetGridSize( VECTOR2D( 50.0, 50.0 ) );
m_viewControls->SetSnapping( true );

3
eeschema/viewlib_frame.cpp

@ -139,7 +139,8 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
// 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 );
SetPresetGrid( m_LastGridSizeId );
// Menu bar is not mandatory: uncomment/comment the next line
// to add/remove the menubar

Loading…
Cancel
Save