From 7d07e6719fd05a75e202ddf7cbbc5b94fb6145d4 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 14 Jul 2020 22:21:32 +0100 Subject: [PATCH] Make sure eeschema default grid is 50mils. Fixes https://gitlab.com/kicad/code/kicad/issues/4835 --- common/settings/app_settings.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/settings/app_settings.cpp b/common/settings/app_settings.cpp index f28964f473..c49fed21d6 100644 --- a/common/settings/app_settings.cpp +++ b/common/settings/app_settings.cpp @@ -262,14 +262,16 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std: m_params.emplace_back( new PARAM_LIST( aJsonPath + ".grid.sizes", &aWindow->grid.sizes, {} ) ); + // pcbnew default grid doesn't matter much, but eeschema does, so default to the index + // of the 50mil grid in eeschema m_params.emplace_back( new PARAM( aJsonPath + ".grid.last_size", - &aWindow->grid.last_size_idx, 0 ) ); + &aWindow->grid.last_size_idx, 1 ) ); m_params.emplace_back( new PARAM( aJsonPath + ".grid.fast_grid_1", - &aWindow->grid.fast_grid_1, 0 ) ); + &aWindow->grid.fast_grid_1, 1 ) ); m_params.emplace_back( new PARAM( aJsonPath + ".grid.fast_grid_2", - &aWindow->grid.fast_grid_2, 1 ) ); + &aWindow->grid.fast_grid_2, 2 ) ); // for grid user, use a default value compatible with eeschema and pcbnew (10 mils) m_params.emplace_back( new PARAM( aJsonPath + ".grid.user_grid_x",